public class Mixed extends Object implements Serializable, Comparable<Object>
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_ARRAY
Constant for type "array"
|
static int |
TYPE_BOOLEAN
Constant for type "byte"
|
static int |
TYPE_BYTE
Constant for type "byte"
|
static int |
TYPE_CHAR
Constant for type "character"
|
static int |
TYPE_DOUBLE
Constant for type "byte"
|
static int |
TYPE_FLOAT
Constant for type "byte"
|
static int |
TYPE_INT
Constant for type "byte"
|
static int |
TYPE_LONG
Constant for type "byte"
|
static int |
TYPE_SHORT
Constant for type "byte"
|
static int |
TYPE_STRING
Constant for type "string"
|
static int |
TYPE_UNKNOWN
Constant for unknown type
|
| Constructor and Description |
|---|
Mixed(boolean value)
Constructor
|
Mixed(byte value)
Constructor
|
Mixed(char value)
Constructor
|
Mixed(double value)
Constructor
|
Mixed(float value)
Constructor
|
Mixed(int value)
Constructor
|
Mixed(long value)
Constructor
|
Mixed(Object value)
Constructor
|
Mixed(short value)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object other) |
boolean |
equals(Object other) |
int |
getType()
Returns the data type (One of the TYPE_* constants)
|
static int |
getTypeOf(Object value)
Returns the type of the specified object
|
Object |
getValue()
Returns the raw value.
|
int |
hashCode() |
boolean |
isArray()
Checks if type is an array.
|
boolean |
isBoolean()
Checks if type is a boolean.
|
boolean |
isByte()
Checks if type is a byte.
|
boolean |
isChar()
Checks if type is a char.
|
boolean |
isDouble()
Checks if type is a double.
|
boolean |
isFloat()
Checks if type is a float.
|
boolean |
isInt()
Checks if type is a int.
|
boolean |
isLong()
Checks if type is a long.
|
boolean |
isNumber()
Checks if type is a number (Float, Double, Byte, Short, Int or Long).
|
boolean |
isShort()
Checks if type is a short.
|
boolean |
isString()
Checks if type is a string.
|
MixedArray |
toArray()
Returns the value as an array.
|
boolean |
toBoolean()
Returns mixed value as a boolean.
|
byte |
toByte()
Returns mixed value as a byte.
|
char |
toChar()
Returns mixed value as a char.
|
double |
toDouble()
Returns mixed value as a double.
|
float |
toFloat()
Returns mixed value as a float.
|
int |
toInt()
Returns mixed value as an int.
|
long |
toLong()
Returns mixed value as a long.
|
short |
toShort()
Returns mixed value as a short.
|
String |
toString() |
Object |
toType(int type)
Returns the value converted to the specified type.
|
public static final int TYPE_UNKNOWN
public static final int TYPE_CHAR
public static final int TYPE_BYTE
public static final int TYPE_SHORT
public static final int TYPE_INT
public static final int TYPE_LONG
public static final int TYPE_FLOAT
public static final int TYPE_DOUBLE
public static final int TYPE_BOOLEAN
public static final int TYPE_STRING
public static final int TYPE_ARRAY
public Mixed(Object value)
value - The real valuepublic Mixed(char value)
value - The mixed valuepublic Mixed(byte value)
value - The mixed valuepublic Mixed(short value)
value - The mixed valuepublic Mixed(int value)
value - The mixed valuepublic Mixed(long value)
value - The mixed valuepublic Mixed(float value)
value - The mixed valuepublic Mixed(double value)
value - The mixed valuepublic Mixed(boolean value)
value - The mixed valuepublic static int getTypeOf(Object value)
value - The objectpublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object other)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public Object toType(int type)
type - The type to convert the object topublic char toChar()
public short toShort()
public byte toByte()
public int toInt()
public long toLong()
public float toFloat()
public MixedArray toArray()
public double toDouble()
public boolean toBoolean()
public int compareTo(Object other)
compareTo in interface Comparable<Object>Comparable.compareTo(java.lang.Object)public int getType()
public Object getValue()
public boolean isChar()
public boolean isByte()
public boolean isShort()
public boolean isInt()
public boolean isLong()
public boolean isFloat()
public boolean isDouble()
public boolean isBoolean()
public boolean isNumber()
public boolean isString()
public boolean isArray()
Copyright © 2006–2017. All rights reserved.