|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.m2technologies.open_arm.utilities.Strings
Copyright 2005 Mark Masterson
Licensed under the Apache License, Version 2.0 (the "License");
you may
not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Description:
Constructor Summary | |
Strings()
|
Method Summary | |
static java.lang.String |
convertStringArrayToString(java.lang.String[] stringArrayValue)
Collapses a String{} into a String. |
static java.lang.String[] |
convertStringToStringArray(java.lang.String stringValue)
Parses a String, using a blank as default delimiter, and converts it to a String{}, where each element of the array is one of the tokens found in the delimited String. |
static java.lang.String[] |
convertStringToStringArray(java.lang.String stringValue,
java.lang.String delimiter)
Parses a String, using the give delimiter, and converts it to a String{}, where each element of the array is one of the tokens found in the delimited String. |
static int |
countForAllOccurencesOf(java.lang.String stringToTest,
java.lang.String searchForValue)
Searches the string passed as first parameter for all occurences of the string passed as the second one. |
static boolean |
isNumeric(java.lang.String stringToTest)
Determines wether the passed string is of numeric value. |
static java.util.Collection |
parseStringToCollection(java.lang.String stringValue,
java.lang.String delimiter)
Parses a String, using the given delimiter, and adds each token thus found to a Collection. |
static java.lang.String |
replaceAllOccurencesOf(java.lang.String stringToTest,
java.lang.String stringToReplace,
java.lang.String replacementValue)
Searches the String passed as first parameter for the String passed as second parameter, and replaces that String, if found, with the String passed as third parameter. |
java.lang.String |
returnEmptyStringIfNull(java.lang.String stringToCheck)
Checks if the parameter passed is a null, and if yes returns an empty string. |
java.lang.String |
returnNullIfEmptyString(java.lang.String stringToCheck)
Checks the String passed as parameter, and returns a programmatic null if it is an empty string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Strings()
Method Detail |
public static int countForAllOccurencesOf(java.lang.String stringToTest, java.lang.String searchForValue)
stringToTest
- searchForValue
-
public static java.lang.String replaceAllOccurencesOf(java.lang.String stringToTest, java.lang.String stringToReplace, java.lang.String replacementValue)
stringToTest
- stringToReplace
- replacementValue
-
public static final java.lang.String convertStringArrayToString(java.lang.String[] stringArrayValue)
stringArrayValue
-
public static final java.lang.String[] convertStringToStringArray(java.lang.String stringValue)
stringValue
- -- the String to parse
public static final java.lang.String[] convertStringToStringArray(java.lang.String stringValue, java.lang.String delimiter)
stringValue
- -- the String to parsedelimiter
- -- delimiter to use in parsing the String
public static final java.util.Collection parseStringToCollection(java.lang.String stringValue, java.lang.String delimiter)
stringValue
- -- the String to parsedelimiter
- -- delimiter to use in parsing the Stringue
public static boolean isNumeric(java.lang.String stringToTest)
stringToTest
-
public java.lang.String returnNullIfEmptyString(java.lang.String stringToCheck)
public java.lang.String returnEmptyStringIfNull(java.lang.String stringToCheck)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |