|
Data Request Broker 2-3-release |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.gael.drb.value.Decimal
public class Decimal
The Decimal class is a generic wrapper for decimal values.
| Field Summary | |
|---|---|
static int |
PRIORITY
The Decimal priority. |
protected BigDecimal |
value
The Decimal value. |
| Fields inherited from interface fr.gael.drb.value.Value |
|---|
ARRAY_ID, BINARY_ID, BINARY_INTEGER_ID, BOOLEAN_ID, BYTE_ID, DATE_ID, DATE_TIME_ID, DAY_ID, DAY_TIME_DURATION_ID, DECIMAL_ID, DOUBLE_ID, DURATION_ID, FLOAT_ID, INT_ID, INTEGER_ID, LONG_ID, MONTH_DAY_ID, MONTH_ID, NULL_ID, NUMERIC_ID, OTHER_ID, SHORT_ID, STRING_ID, TIME_ID, UNKNOWN_ID, UNSIGNED_BYTE_ID, UNSIGNED_INT_ID, UNSIGNED_LONG_ID, UNSIGNED_SHORT_ID, YEAR_ID, YEAR_MONTH_DURATION_ID, YEAR_MONTH_ID |
| Fields inherited from interface fr.gael.drb.DrbItem |
|---|
ATTRIBUTE_ITEM, NODE_ITEM, UNDEFINED_ITEM, VALUE_ITEM |
| Constructor Summary | |
|---|---|
protected |
Decimal(BigDecimal val)
Constructs a Decimal object initialized to the specified decimal value. |
|
Decimal(double val)
Constructs a Decimal object initialized to the specified decimal value. |
|
Decimal(String val)
Constructs a Decimal object initialized to the specified decimal value. |
| Method Summary | |
|---|---|
Value |
add(Value x)
Compute an addition. |
boolean |
and(Value x)
Compute a logical AND. |
void |
assign(boolean value)
Assign a boolean value. |
void |
assign(byte value)
Assign a byte value. |
void |
assign(double value)
Assign a double value. |
void |
assign(float value)
Assign a float value. |
void |
assign(int value)
Assign an int value. |
void |
assign(long value)
Assign a long value. |
void |
assign(short value)
Assign short value. |
void |
assign(Value v)
Assign a new Value. |
boolean |
booleanValue()
Returns this value as a boolean |
byte |
byteValue()
Returns this value as a byte (signed 8 bits). |
int |
compareTo(Object obj)
Compares this object with the specified object for order. |
int |
compareTo(Value x)
Compare this value with another value. |
Value |
convertTo(int type)
Convert the value into the specified type. |
protected BigDecimal |
decimalValue()
Returns this value as a BigDecimal. |
Value |
divide(Value x)
Compute a division. |
double |
doubleValue()
Returns this value as a double (signed 64 bits IEEE 754). |
boolean |
equals(Object obj)
Indicates whether this value is "equal to" to another value. |
float |
floatValue()
Returns this value as a float (signed 32 bits IEEE 754). |
int |
getItemType()
A code that identifies the value items. |
String |
getName()
Name of the item. |
String |
getNamespaceURI()
Get namespace URI. |
int |
getPriority()
Returns the Decimal priority |
int |
getType()
The type identifier of this Decimal value. |
Value |
getValue()
The value of the item. |
int |
hashCode()
Returns a hash code value for the object. |
protected BigInteger |
integerValue()
Returns this value as a BigInteger. |
int |
intValue()
Returns this value as an integer (signed 32 bits). |
long |
longValue()
Returns this value as a long integer (signed 64 bits). |
Value |
modulus(Value x)
Compute a modulus. |
Value |
multiply(Value x)
Compute a multiplication. |
boolean |
or(Value x)
Compute a logical OR. |
void |
rename(String name)
Changes the name of the item. |
void |
setNamespaceURI(String namespace_uri)
Sets a namespace resource identifier. |
Value |
setValue(Value value)
Changes the value of the item. |
short |
shortValue()
Returns this value as a short integer (signed 16 bits). |
Value |
sub(Value x)
Compute a substraction. |
Numeric |
toNumeric()
Convert the value into the numeric type. |
String |
toString()
Returns a new String object representing this Decimal. |
Value |
unaryMinus()
Compute the unary minus of this value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fr.gael.drb.DrbItem |
|---|
getItemType, getName, getNamespaceURI, getValue, rename, setNamespaceURI, setValue |
| Field Detail |
|---|
public static final int PRIORITY
protected BigDecimal value
| Constructor Detail |
|---|
public Decimal(String val)
val - the value of the Decimal.public Decimal(double val)
val - the value of the Decimal.protected Decimal(BigDecimal val)
val - the value of the Decimal.| Method Detail |
|---|
public String toString()
toString in class Objectpublic int getType()
getType in interface Valuepublic final int getPriority()
public Value convertTo(int type)
throws ClassCastException
convertTo in interface Valuetype - The target type.
ClassCastException - the conversion is impossiblepublic void assign(Value v)
v - the value to be assigned.public Value unaryMinus()
public final Value add(Value x)
x - another value.
public Value sub(Value x)
x - another value.
public Value multiply(Value x)
x - another value.
public final Value divide(Value x)
x - another value.
public Value modulus(Value x)
x - another value.
public int compareTo(Value x)
x - another value.
public final boolean booleanValue()
public final byte byteValue()
public final short shortValue()
public final int intValue()
public final long longValue()
public final float floatValue()
public final double doubleValue()
protected final BigInteger integerValue()
protected final BigDecimal decimalValue()
public final void assign(boolean value)
value - another value.public final void assign(byte value)
value - another value.public final void assign(short value)
value - another value. The conversion may result in a loss of
precision.public final void assign(int value)
value - another value.public final void assign(long value)
value - another value. The conversion may result in a loss of
precision.public final void assign(float value)
value - another value. The conversion may result in a loss of
precision.public final void assign(double value)
value - another value. The conversion may result in a loss of
precision.public boolean equals(Object obj)
equals in class Objectobj - another value.
public int hashCode()
hashCode in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparableobj - the Object to be compared.
public final Numeric toNumeric()
throws ClassCastException
ClassCastException - is the convertion is impossiblepublic final boolean and(Value x)
and in interface Logicx - another value.
public final boolean or(Value x)
or in interface Logicx - another value.
public int getItemType()
getItemType in interface DrbItempublic String getName()
getName in interface DrbItem
public void rename(String name)
throws NullPointerException,
UnsupportedOperationException
rename in interface DrbItemname - Reference to the new name.
UnsupportedOperationException - This exception always raised because
the name property is not defined for values.
NullPointerException - This exception is overriden by an
UnsupportedOperationException.public String getNamespaceURI()
getNamespaceURI in interface DrbItem
public void setNamespaceURI(String namespace_uri)
throws NullPointerException,
UnsupportedOperationException
setNamespaceURI in interface DrbItemnamespace_uri - A reference to the new namespace identifier.
UnsupportedOperationException - This exception always raised because
the name property is not defined for values.
NullPointerException - This exception is overriden by an
UnsupportedOperationException.public Value getValue()
getValue in interface DrbItem
public Value setValue(Value value)
throws NullPointerException,
ClassCastException,
UnsupportedOperationException
setValue in interface DrbItemvalue - The new value of the node. This value shall not be null.
NullPointerException - This exception is raised when the passed
reference to the value is null. This exception may be overriden
by an UnsupportedOperationException.
ClassCastException - This exception is raised when the
implementation has not succeeded to cast the input value in a
type compatible with the current node.
UnsupportedOperationException - This exception is raised when the
implementation does not support the requested assignment for
any reason.
|
Data Request Broker - DRB API® 2-3-release |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||