|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiamondedge.util.Variant
public class Variant
Field Summary | |
---|---|
static short |
ARRAY
Flag that is OR'd in with the other vartypes to indicate an array of that type. |
static short |
BOOLEAN
Boolean data type (true/false). |
static short |
BYTE
Byte (signed 1 byte). |
static short |
DATE
Date data type. |
static short |
DECIMAL
BigDecimal (scaled floating-point) data type. |
static short |
DOUBLE
Double-precision floating-point data type. |
static short |
EMPTY
Empty (uninitialized) data type. |
static short |
ERROR
Integer data type (4 byte) holding an error code. |
static short |
FLOAT
Single-precision floating-point data type. |
static short |
INTEGER
Integer data type (4 byte). |
static short |
LONG
Long data type (8 byte). |
static short |
NULL
Null (no valid data) data type. |
static short |
OBJECT
Object data type (any object other than Date, String, BigDecimal). |
static short |
SHORT
Short data type (2 byte). |
static short |
STRING
String data type. |
static short |
VARIANT
Not used as a vartype for Variants but indicates that a Variant is needed or used. |
Constructor Summary | |
---|---|
Variant()
|
|
Variant(boolean val)
|
|
Variant(Date val)
|
|
Variant(double val)
|
|
Variant(int val)
|
|
Variant(int val,
int vt)
|
|
Variant(Object val)
|
|
Variant(Object val,
int vt)
|
|
Variant(String val)
|
Method Summary | |
---|---|
Variant |
add(Variant val)
Returns a Variant whose value is (this + val). |
void |
changeType(int vt)
|
Object |
clone()
|
int |
compareTo(Object v)
Compares the Variant to another object numerically or lexicographically depending on the datatypes. |
int |
compareTo(Variant v)
Compares two Variants numerically or lexicographically depending on the datatypes. |
Variant |
divide(Variant val)
Returns a Variant whose value is (this / val). |
boolean |
equals(double testVal)
|
boolean |
equals(int testVal)
|
boolean |
equals(Object obj)
|
String |
getTypeName()
|
static Variant |
getValue(Object obj,
String propName)
Perform a late-bound retrieving of a property value on the given object |
Variant |
getValue(String propName)
Perform a late-bound retrieving of a property value on the object stored in this variant Note: this operation is slow due to dynamically looking up meta information at runtime. |
Variant |
getValue(String propName,
int[] dims)
Perform a late-bound retrieving of a property value on the object stored in this variant The property on the object in this variant should be an array. |
Variant |
getValueAt(int index)
Perform a late-bound retrieving of an element of the array stored in this variant This variant should be holding a single dimensioned array. |
Variant |
getValueAt(int[] indicies)
Perform a late-bound retrieving of an element of the array stored in this variant The |
int |
getVarType()
|
static int |
getVarType(Class cls)
|
static int |
getVarType(Object val)
|
int |
hashCode()
|
static Variant |
invoke(Object obj,
String methName,
Variant[] args)
|
Variant |
invoke(String methName,
Variant[] args)
Perform a late-bound function call on the object stored in this variant Note: this operation is slow due to dynamically looking up meta information at runtime. |
boolean |
isArray()
|
boolean |
isDate()
|
boolean |
isEmpty()
|
boolean |
isError()
|
boolean |
isNull()
|
boolean |
isNumeric()
|
static boolean |
isNumeric(Class cls)
|
boolean |
isObject()
|
Variant |
multiply(Variant val)
Returns a Variant whose value is (this * val). |
Variant |
negate()
Returns a Variant whose value is (-this). |
void |
set(BigDecimal val)
|
void |
set(boolean val)
|
void |
set(byte val)
|
void |
set(Date val)
|
void |
set(double val)
|
void |
set(float val)
|
void |
set(int val)
|
void |
set(int val,
int vt)
|
void |
set(long val)
|
void |
set(Object val)
|
void |
set(Object val,
int vt)
|
void |
set(short val)
|
void |
set(String val)
|
Variant |
setNull()
|
static void |
setValue(Object obj,
String propName,
Variant newval)
Perform a late-bound setting of a property value on the given object |
void |
setValue(String propName,
Variant newval)
Perform a late-bound setting of a property value on the object stored in this variant Note: this operation is slow due to dynamically looking up meta information at runtime. |
void |
setValueAt(int[] indicies,
Variant newval)
Perform a late-bound setting of an element of the array stored in this variant The |
void |
setValueAt(int index,
Variant newval)
Perform a late-bound setting of an element of the array stored in this variant This variant should be holding a single dimensioned array. |
Variant |
subtract(Variant val)
Returns a Variant whose value is (this - val). |
boolean |
toBoolean()
|
byte |
toByte()
|
byte[] |
toBytes()
|
Date |
toDate()
|
Date |
toDateNew()
|
BigDecimal |
toDecimal()
|
double |
toDouble()
|
float |
toFloat()
|
int |
toInt()
|
long |
toLong()
|
Object |
toObject()
|
short |
toShort()
|
String |
toString()
|
static String |
typeName(int vartype)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short EMPTY
public static final short NULL
public static final short BYTE
public static final short SHORT
public static final short INTEGER
public static final short ERROR
public static final short LONG
public static final short FLOAT
public static final short DOUBLE
public static final short DECIMAL
public static final short BOOLEAN
public static final short VARIANT
public static final short OBJECT
public static final short DATE
public static final short STRING
public static final short ARRAY
Constructor Detail |
---|
public Variant()
public Variant(int val)
public Variant(double val)
public Variant(Object val)
public Variant(Object val, int vt)
public Variant(boolean val)
public Variant(String val)
public Variant(Date val)
public Variant(int val, int vt)
Method Detail |
---|
public int compareTo(Variant v)
return 0 if value contained in variants are equal return a value > 0 if this variants value is > than variant v's value return a value < 0 if this variant's value is < than variant v's value
public int compareTo(Object v)
return 0 if value contained in variants are equal return a value > 0 if this variants value is > than variant v's value return a value < 0 if this variant's value is < than variant v's value
public boolean equals(Object obj)
equals
in class Object
public boolean equals(int testVal)
public boolean equals(double testVal)
public int hashCode()
hashCode
in class Object
public final int getVarType()
public static int getVarType(Class cls)
public static int getVarType(Object val)
public static String typeName(int vartype)
public final String getTypeName()
public void changeType(int vt) throws Exception
Exception
public final void set(Object val)
public final void set(Object val, int vt)
public final void set(Date val)
public final void set(boolean val)
public final void set(byte val)
public final void set(short val)
public final void set(int val)
public final void set(int val, int vt)
public final void set(long val)
public final void set(BigDecimal val)
public final void set(float val)
public final void set(double val)
public final void set(String val)
public final Variant setNull()
public final boolean toBoolean()
public final int toInt()
public final long toLong()
public final double toDouble()
public final BigDecimal toDecimal()
public final String toString()
toString
in class Object
public final byte[] toBytes()
public final byte toByte()
public final short toShort()
public final float toFloat()
public final Date toDate()
public final Date toDateNew()
public final Object toObject()
public final boolean isArray()
public final boolean isDate()
public final boolean isEmpty()
public final boolean isError()
public final boolean isNull()
public static boolean isNumeric(Class cls)
public final boolean isNumeric()
public final boolean isObject()
public Object clone()
clone
in class Object
public final Variant invoke(String methName, Variant[] args) throws IllegalAccessException, InvocationTargetException
IllegalAccessException
InvocationTargetException
public static Variant invoke(Object obj, String methName, Variant[] args) throws IllegalAccessException, InvocationTargetException
IllegalAccessException
InvocationTargetException
public final void setValue(String propName, Variant newval) throws IllegalAccessException, NoSuchFieldException
IllegalAccessException
NoSuchFieldException
public static void setValue(Object obj, String propName, Variant newval) throws IllegalAccessException, NoSuchFieldException
IllegalAccessException
NoSuchFieldException
public final Variant getValue(String propName) throws IllegalAccessException, NoSuchFieldException
IllegalAccessException
NoSuchFieldException
public static Variant getValue(Object obj, String propName) throws IllegalAccessException, NoSuchFieldException
IllegalAccessException
NoSuchFieldException
public final Variant getValue(String propName, int[] dims) throws IllegalAccessException, NoSuchFieldException
IllegalAccessException
NoSuchFieldException
public final Variant getValueAt(int index)
public final Variant getValueAt(int[] indicies)
public final void setValueAt(int index, Variant newval)
public final void setValueAt(int[] indicies, Variant newval)
public final Variant add(Variant val)
val
- value to be added to this Variant.
public final Variant subtract(Variant val)
val
- value to be subtracted from this Variant.
public final Variant multiply(Variant val)
val
- value to be multiplied by this Variant.
public final Variant divide(Variant val)
val
- value by which this Variant is to be divided.
ArithmeticException
- val==0public final Variant negate()
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |