public class StorageUnitNumberInput extends NumberInput<java.lang.Long>
Input
for storage size in specified Units
.
The returned value (and the bounds etc.) are always in bytes but the text representation
(and numeric values passed to convert(Object)
are in the specified unit.nf
validators
Constructor and Description |
---|
StorageUnitNumberInput(Units unit) |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
convert(java.lang.Object v)
Perform any supported type conversions to to generate a value of the
target type
|
java.lang.String |
getPrettyString(java.lang.Long val)
Convert a value into a user friendly string.
|
java.lang.String |
getString(java.lang.Long val)
get a String representation of an Object that is compatible with the way
the input is parsed
|
java.lang.Long |
parseValue(java.lang.String v)
Parse a String into the correct type for this input.
|
formatRange, getMax, getMin, getStep, getType, getUnit, setMax, setMin, setNumberFormat, setStep, setUnit
accept, getBoxWidth, getMaxResultLength, getSingle, setBoxWidth, setMaxResultLength, setSingle
getValue, setKey, setValue
addValidator, getKey, getString, removeValidator, validate, validateInner
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, addValidator, getKey, getValue, isEmpty, removeValidator, setKey, setValue, validate
getString, parse
public StorageUnitNumberInput(Units unit)
public java.lang.Long parseValue(java.lang.String v) throws ParseException
ParseInput
Input.getString(Object)
method.ParseException
public java.lang.String getString(java.lang.Long val)
BaseInput
getString
in interface Input<java.lang.Long>
getString
in class NumberInput<java.lang.Long>
ParseInput
public java.lang.Long convert(java.lang.Object v) throws TypeError
Input
public java.lang.String getPrettyString(java.lang.Long val)
Input
getPrettyString
in interface Input<java.lang.Long>
getPrettyString
in class BaseInput<java.lang.Long>
ListInput