|
|||||||||
| 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 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(String s1,
String s2)
Compares two String values for sorting purposes. |
static int |
compareStrings(String s1,
String s2,
Locale locale)
Compares two String values for sorting purposes. |
Object |
getValue(Object object,
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, 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 String ClassName
| Constructor Detail |
|---|
public StringFormatter()
StringFormatter.
| Method Detail |
|---|
public static int compareStrings(String s1,
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 ordered
public static int compareStrings(String s1,
String s2,
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 ordered
public Object getValue(Object object,
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 Formatterobject - the object to convert to a Stringlocale - 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 | ||||||||