|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.formatter.Formatter
ariba.util.formatter.StringFormatter
public class StringFormatter
StringFormatter
is a subclass of Formatter
which
is responsible for formatting, parsing, and comparing strings.
Field Summary | |
---|---|
static java.lang.String |
ClassName
Our Java class name. |
Fields inherited from interface ariba.util.core.Compare |
---|
EqualTo, GreaterThan, LessThan |
Constructor Summary | |
---|---|
StringFormatter()
Creates a new StringFormatter . |
Method Summary | |
---|---|
static int |
compareStrings(java.lang.String s1,
java.lang.String s2)
Compares two String values for sorting purposes. |
static int |
compareStrings(java.lang.String s1,
java.lang.String s2,
java.util.Locale locale)
Compares two String values for sorting purposes. |
java.lang.Object |
getValue(java.lang.Object object,
java.util.Locale locale)
Returns a new String derived from the given object. |
Methods inherited from class ariba.util.formatter.Formatter |
---|
canFormatNulls, compare, compare, equal, equal, getFormat, getFormat, getFormatterClassForType, getFormatterForObject, getFormatterForType, getLocale, getStringValue, getStringValue, getValue, handlesNulls, isBidirectional, makeParseException, makeParseException, makeParseException, makeParseExceptionMessage, makeParseExceptionMessage, objectsAreEqual, objectsAreEqual, parse, parse, parseString, parseString, quickCompare, quickCompare, quickCompareValue, registerFormatter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ClassName
Constructor Detail |
---|
public StringFormatter()
StringFormatter
.
Method Detail |
---|
public static int compareStrings(java.lang.String s1, java.lang.String s2)
String
values for sorting purposes.
Returns an int
value which is less than, equal
to, or greater than zero depending on whether the first object
sorts before, the same, or after the second object. Uses the
default locale to create a Collator
instance to
do the comparison.
s1
- the first String
to compares2
- the second String
to compare
int
value which determines how the two strings
should be orderedpublic static int compareStrings(java.lang.String s1, java.lang.String s2, java.util.Locale locale)
String
values for sorting purposes. Returns
an int
value which is less than, equal to, or greater
than zero depending on whether the first object sorts before, the
same, or after the second object. Uses the given locale
to create a Collator
instance to do the comparison. The
locale
must be non-null.
s1
- the first String
to compares2
- the second String
to comparelocale
- the locale to do the comparison
int
value which determines how the two strings
should be orderedpublic java.lang.Object getValue(java.lang.Object object, java.util.Locale locale)
String
derived from the given object. If
the object is not a String
, returns the result of calling
the toString
method on the object. The
locale
parameter is currently unused.
getValue
in class Formatter
object
- the object to convert to a String
locale
- the Locale
to use for conversion (unused)
String
derived from the given object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |