|
|||||||||
| 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.IntegerArrayFormatter
public class IntegerArrayFormatter
IntegerArrayFormatter is a subclass of Formatter
which is responsible for formatting int arrays and/or
Integer arrays.
| Field Summary | |
|---|---|
static String |
ClassName
Our Java class name. |
| Fields inherited from interface ariba.util.core.Compare |
|---|
EqualTo, GreaterThan, LessThan |
| Constructor Summary | |
|---|---|
IntegerArrayFormatter()
Creates a new IntegerArrayFormatter. |
|
| Method Summary | |
|---|---|
static String |
getStringValue(int[] array)
Returns a formatted string for the given int array. |
static String |
getStringValue(Integer[] array)
Returns a formatted string for the given Integer array. |
Object |
getValue(Object object,
Locale locale)
Returns an object of the appropriate type for this formatter based on 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 IntegerArrayFormatter()
IntegerArrayFormatter.
| Method Detail |
|---|
public static String getStringValue(Integer[] array)
Integer array.
The array is first sorted and then formatted like "5, 1, 7". Ranges
of consecutive numbers are also consolidated, so the array "1,3,4,5"
would be turned into the string "1, 3-5".
array - the Integer array to format into a string
Integer arraypublic static String getStringValue(int[] array)
int array. The
array is first sorted and then formatted like "5, 1, 7". Ranges of
consecutive numbers are also consolidated, so the array "1,3,4,5"
would be turned into the string "1, 3-5".
array - the int array to format into a string
int array
public Object getValue(Object object,
Locale locale)
FormatterThe type of the given object can by anything; it is up to each specific implementation to do the appropriate conversion, parsing, etc. to create a value of the appropriate type.
The return value may be null depending on the specific implementation for a given formatter.
Subclasses must define this method to provide type-specific conversion.
getValue in class Formatterobject - the object to convert to the type for this formatterlocale - the locale used when converting the object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||