public final class TObject extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static TObject |
BOOLEAN_FALSE |
static TObject |
BOOLEAN_NULL |
static TObject |
BOOLEAN_TRUE |
static TObject |
NULL_OBJECT |
Constructor and Description |
---|
TObject(TType type,
Object ob)
Constructs the TObject as the given type.
|
Modifier and Type | Method and Description |
---|---|
int |
approximateMemoryUse()
Returns the approximate memory use of this object in bytes.
|
static TObject |
bigNumberVal(BigNumber val)
Returns a TObject of numeric type that represents the given BigNumber
value.
|
static TObject |
booleanVal(boolean b)
Returns a TObject of boolean type that is either true or false.
|
TObject |
castTo(TType cast_to_type)
Casts this object to the given type and returns a new TObject.
|
boolean |
comparableTypes(TObject ob)
Returns true if the type of this object is logically comparable to the
type of the given object.
|
int |
compareTo(TObject tob)
Compares this object with the given object (which is of a logically
comparable type).
|
int |
compareToNoNulls(TObject tob)
Compares this object with the given object (which is of a logically
comparable type).
|
static TObject |
createAndCastFromObject(TType type,
Object ob)
Returns a TObject of the given type and with the given Java object.
|
static TObject |
dateVal(Date d)
Returns a TObject of DATE type that represents the given time value.
|
static TObject |
doubleVal(double val)
Returns a TObject of numeric type that represents the given double value.
|
boolean |
equals(Object ob)
Equality test.
|
Object |
getObject()
Returns a java.lang.Object that is the data behind this object.
|
TType |
getTType()
Returns the type of this object.
|
static TObject |
intVal(int val)
Returns a TObject of numeric type that represents the given int value.
|
boolean |
isNull()
Returns true if the object is null.
|
static TObject |
longVal(long val)
Returns a TObject of numeric type that represents the given long value.
|
static TObject |
nullVal()
Returns a TObject of NULL type that represents a null value.
|
static TObject |
objectVal(Object ob)
Returns a TObject from the given Java value.
|
TObject |
operatorAdd(TObject val)
Mathematical addition of this object to the given object.
|
TObject |
operatorConcat(TObject val)
String concat of this object to the given object.
|
TObject |
operatorDivide(TObject val)
Mathematical division of this object to the given object.
|
TObject |
operatorEquals(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorGreater(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorGreaterEquals(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorIs(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorLess(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorLessEquals(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorMultiply(TObject val)
Mathematical multiply of this object to the given object.
|
TObject |
operatorNot()
Performs a logical NOT on this value.
|
TObject |
operatorNotEquals(TObject val)
Comparison of this object and the given object.
|
TObject |
operatorOr(TObject val)
Bitwise OR operation of this object with the given object.
|
TObject |
operatorSubtract(TObject val)
Mathematical subtraction of this object to the given object.
|
static TObject |
stringVal(String str)
Returns a TObject of VARCHAR type that represents the given String value.
|
static TObject |
stringVal(StringObject str)
Returns a TObject of VARCHAR type that represents the given StringObject
value.
|
BigNumber |
toBigNumber()
Returns the BigNumber of this object if this object is a numeric type.
|
Boolean |
toBoolean()
Returns the Boolean of this object if this object is a boolean type.
|
String |
toString() |
String |
toStringValue()
Returns the String of this object if this object is a string type.
|
boolean |
valuesEqual(TObject ob)
Equality test.
|
public static final TObject BOOLEAN_TRUE
public static final TObject BOOLEAN_FALSE
public static final TObject BOOLEAN_NULL
public static final TObject NULL_OBJECT
public TType getTType()
public boolean isNull()
public Object getObject()
public int approximateMemoryUse()
public boolean comparableTypes(TObject ob)
public BigNumber toBigNumber()
public Boolean toBoolean()
public String toStringValue()
public static TObject booleanVal(boolean b)
public static TObject intVal(int val)
public static TObject longVal(long val)
public static TObject doubleVal(double val)
public static TObject bigNumberVal(BigNumber val)
public static TObject stringVal(StringObject str)
public static TObject stringVal(String str)
public static TObject dateVal(Date d)
public static TObject nullVal()
public int compareToNoNulls(TObject tob)
This can not be used to compare null values so it assumes that checks for null have already been made.
public int compareTo(TObject tob)
This compares NULL values before non null values, and null values are equal.
public boolean equals(Object ob)
public boolean valuesEqual(TObject ob)
public TObject operatorOr(TObject val)
public TObject operatorAdd(TObject val)
public TObject operatorSubtract(TObject val)
public TObject operatorMultiply(TObject val)
public TObject operatorDivide(TObject val)
public TObject operatorConcat(TObject val)
This operator always returns an object that is a VARCHAR string type of unlimited size with locale inherited from either this or val depending on whether the locale information is defined or not.
public TObject operatorIs(TObject val)
public TObject operatorEquals(TObject val)
public TObject operatorNotEquals(TObject val)
public TObject operatorGreater(TObject val)
public TObject operatorGreaterEquals(TObject val)
public TObject operatorLess(TObject val)
public TObject operatorLessEquals(TObject val)
public TObject operatorNot()
public static TObject createAndCastFromObject(TType type, Object ob)
public TObject castTo(TType cast_to_type)
Copyright © 2015. All rights reserved.