File Source: OldStringUtils.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldStringUtils__static_init
          */
     1  /*
     2  * Licensed to the Apache Software Foundation (ASF) under one or more
     3  *  contributor license agreements.  The ASF licenses this file to You
     4  * under the Apache License, Version 2.0 (the "License"); you may not
     5  * use this file except in compliance with the License.
     6  * You may obtain a copy of the License at
     7  *
     8  *     http://www.apache.org/licenses/LICENSE-2.0
     9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.  For additional information regarding
    15  * copyright in this work, please see the NOTICE file in the top level
    16  * directory of this distribution.
    17  */
    18  /*
    19   * Created on Jun 3, 2004
    20   */
    21  package org.apache.roller.weblogger.ui.rendering.velocity.deprecated;
    22  
    23  /**
    24   * @author lance.lavandowska
    25   */
         /* 
    P/P   *  Method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldStringUtils()
          */
    26  public class OldStringUtils
    27  {
    28      public static boolean isEmpty(String str)
    29      {
                 /* 
    P/P           *  Method: bool isEmpty(String)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  * 
                  *  Test Vectors:
                  *    str: Inverse{null}, Addr_Set{null}
                  */
    30          if (str == null) return true;
    31          return "".equals(str.trim());
    32      }
    33      
    34      public static boolean isNotEmpty(String str)
    35      {
                 /* 
    P/P           *  Method: bool isNotEmpty(String)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    36          return !isEmpty(str);
    37      }
    38      
    39      public static String[] split(String str1, String str2)
    40      {
                /* 
    P/P          *  Method: String[] split(String, String)
                 * 
                 *  Postconditions:
                 *    init'ed(return_value)
                 */
    41         return org.apache.commons.lang.StringUtils.split(str1, str2);
    42      }
    43      
    44      public static String replace(String src, String target, String rWith)
    45      {
                 /* 
    P/P           *  Method: String replace(String, String, String)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    46          return org.apache.commons.lang.StringUtils.replace(src, target, rWith);
    47      }
    48      
    49      public static String replace(String src, String target, String rWith, int maxCount)
    50      {
                 /* 
    P/P           *  Method: String replace(String, String, String, int)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    51          return org.apache.commons.lang.StringUtils.replace(src, target, rWith, maxCount);
    52      }
    53      
    54      public static boolean equals(String str1, String str2) 
    55      {
                 /* 
    P/P           *  Method: bool equals(String, String)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    56          return org.apache.commons.lang.StringUtils.equals(str1, str2);
    57      }
    58      
    59      public static boolean isAlphanumeric(String str)
    60      {
                 /* 
    P/P           *  Method: bool isAlphanumeric(String)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    61          return org.apache.commons.lang.StringUtils.isAlphanumeric(str);
    62      }
    63      
    64      public static String[] stripAll(String[] strs) 
    65      {
                 /* 
    P/P           *  Method: String[] stripAll(String[])
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    66          return org.apache.commons.lang.StringUtils.stripAll(strs);
    67      }
    68      
    69      public static String left(String str, int length)
    70      {
                 /* 
    P/P           *  Method: String left(String, int)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    71          return org.apache.commons.lang.StringUtils.left(str, length);
    72      }
    73  }








SofCheck Inspector Build Version : 2.18479
OldStringUtils.java 2009-Jan-02 14:24:48
OldStringUtils.class 2009-Sep-04 03:12:45