Package org.zkoss.chart.util
Class AnyVal<T>
- java.lang.Object
-
- org.zkoss.chart.util.AnyVal<T>
-
- All Implemented Interfaces:
Serializable,org.zkoss.json.JSONAware
public class AnyVal<T> extends Object implements org.zkoss.json.JSONAware, Serializable
AnyVal is the root class of all primitive types, which describe values not implemented as objects in the underlying host system.- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]asArray()Returns the origin value as an array, if possible.booleanasBoolean()Returns the origin value as boolean type, if possible.boolean[]asBooleanArray()Returns the origin value as boolean array, if possible.byteasByte()Returns the origin value in byte type, if possible.byte[]asByteArray()Returns the origin value as byte array, if possible.charasChar()Returns the origin value as char type, if possible.char[]asCharArray()Returns the origin value as char array, if possible.doubleasDouble()Returns the origin value as double type, if possible.double[]asDoubleArray()Returns the origin value as double array, if possible.floatasFloat()Returns the origin value as float type, if possible.float[]asFloatArray()Returns the origin value as float array, if possible.intasInt()Returns the origin value as int type, if possible.int[]asIntArray()Returns the origin value as int array, if possible.List<?>asList()Returns the origin value as a list, if possible.longasLong()Returns the origin value as long type, if possible.long[]asLongArray()Returns the origin value as long array, if possible.Map<?,?>asMap()Returns the origin value as a map, if possible.NumberasNumber()Returns the origin value as number type, if possible.Number[]asNumberArray()Returns the origin value as Number array, if possible.Set<?>asSet()Returns the origin value as a set, if possible.shortasShort()Returns the origin value as short type, if possible.short[]asShortArray()Returns the origin value as short array, if possible.StringasString()Returns the origin value as string type, if possible.String[]asStringArray()Returns the origin value as string array, if possible.ObjectasValue()Returns the origin valuebooleanequals(Object obj)inthashCode()StringtoJSONString()StringtoString()
-
-
-
Constructor Detail
-
AnyVal
public AnyVal(T val)
-
-
Method Detail
-
asValue
public Object asValue()
Returns the origin value
-
asInt
public int asInt()
Returns the origin value as int type, if possible.
-
asString
public String asString()
Returns the origin value as string type, if possible.
-
asBoolean
public boolean asBoolean()
Returns the origin value as boolean type, if possible.
-
asNumber
public Number asNumber()
Returns the origin value as number type, if possible.
-
asLong
public long asLong()
Returns the origin value as long type, if possible.
-
asDouble
public double asDouble()
Returns the origin value as double type, if possible.
-
asFloat
public float asFloat()
Returns the origin value as float type, if possible.
-
asShort
public short asShort()
Returns the origin value as short type, if possible.
-
asChar
public char asChar()
Returns the origin value as char type, if possible.
-
asByte
public byte asByte()
Returns the origin value in byte type, if possible.
-
asList
public List<?> asList()
Returns the origin value as a list, if possible.
-
asMap
public Map<?,?> asMap()
Returns the origin value as a map, if possible.
-
asSet
public Set<?> asSet()
Returns the origin value as a set, if possible.
-
asArray
public Object[] asArray()
Returns the origin value as an array, if possible.
-
asNumberArray
public Number[] asNumberArray()
Returns the origin value as Number array, if possible.
-
asIntArray
public int[] asIntArray()
Returns the origin value as int array, if possible.
-
asFloatArray
public float[] asFloatArray()
Returns the origin value as float array, if possible.
-
asLongArray
public long[] asLongArray()
Returns the origin value as long array, if possible.
-
asDoubleArray
public double[] asDoubleArray()
Returns the origin value as double array, if possible.
-
asBooleanArray
public boolean[] asBooleanArray()
Returns the origin value as boolean array, if possible.
-
asShortArray
public short[] asShortArray()
Returns the origin value as short array, if possible.
-
asCharArray
public char[] asCharArray()
Returns the origin value as char array, if possible.
-
asStringArray
public String[] asStringArray()
Returns the origin value as string array, if possible.
-
asByteArray
public byte[] asByteArray()
Returns the origin value as byte array, if possible.
-
toJSONString
public String toJSONString()
- Specified by:
toJSONStringin interfaceorg.zkoss.json.JSONAware
-
-