public class MemoryParser extends java.lang.Object implements ValueParser<java.lang.Long>
| Modifier and Type | Field and Description |
|---|---|
static MemoryParser |
PARSER |
| Constructor and Description |
|---|
MemoryParser() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(java.lang.Long value)
Format a value as a string.
|
java.lang.Class<java.lang.Long> |
getType()
Returns the
Class of object this ValueParser can handle. |
java.lang.Long |
parse(java.lang.String valueString)
Parses the specified string and constructs the appropriate object out of
it.
|
public static MemoryParser PARSER
public java.lang.Class<java.lang.Long> getType()
ValueParserClass of object this ValueParser can handle.
The ValueParser.parse(String) method must return objects that are assignable to this type.
The #format(T) method can format any object assignable to this type.
The returned class will be the
exact Class (i.e. not a subclass) of this
ValueParser's typegetType in interface ValueFormatter<java.lang.Long>getType in interface ValueParser<java.lang.Long>ValueParserpublic java.lang.Long parse(java.lang.String valueString)
throws ValueParseException
ValueParserparse in interface ValueParser<java.lang.Long>ValueParseException - If valueString is not of a format that allows this
parser to convert it into an object of type TvalueString - The string to parsevalueStringpublic java.lang.String format(java.lang.Long value)
ValueParserformat in interface ValueFormatter<java.lang.Long>format in interface ValueParser<java.lang.Long>value - The object to format