|
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.UnsignedShort
public class UnsignedShort
The UnsignedShort class is a generic wrapper for unsigned short values.
| Field Summary |
|---|
| 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 | |
|---|---|
UnsignedShort(int value)
Builds an UnsignedShort object initialized to the specified int value. |
|
UnsignedShort(short value)
Builds an UnsignedShort object initialized to the specified short value. |
|
| Method Summary | |
|---|---|
Value |
add(Value x)
Adds the specified value to the current short value. |
boolean |
and(Value x)
Compute a logical AND. |
void |
assign(boolean value)
assign a new boolean value |
void |
assign(byte value)
assign a new byte value |
void |
assign(double value)
assign a new double value |
void |
assign(float value)
assign a new float value |
void |
assign(int value)
assign a new int value |
void |
assign(long value)
assign a new long value |
void |
assign(short value)
assign a new short value |
void |
assign(Value v)
assign a new Value |
boolean |
booleanValue()
indicates if the value is not 0 |
byte |
byteValue()
return the byte value. |
int |
compareTo(Object obj)
Compares this object with the specified object for order. |
int |
compareTo(Value x)
compare the current value to the given one. |
Value |
convertTo(int type)
In particular this operation that performs non obvious conversions. |
protected BigDecimal |
decimalValue()
Returns this value as a BigDecimal. |
Value |
divide(Value x)
Divides the specified value by the current short value. |
double |
doubleValue()
return the double value. |
boolean |
equals(Object obj)
Indicates whether this value is "equal to" to another value. |
float |
floatValue()
return the float value. |
byte[] |
getFormattedBuffer()
Returns a byte buffer containing the value in a fixed format. |
String |
getFormattedString(int length)
Returns a string containing the value with a fixed format. |
int |
getItemType()
A code that identifies the value items. |
String |
getName()
Name of the item. |
String |
getNamespaceURI()
Get namespace URI. |
int |
getPriority()
Returns the current Value priority. |
int |
getType()
Returns the current Value type |
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()
return the int value. |
long |
longValue()
return the long value. |
Value |
modulus(Value x)
Compute the modulus of the current short value by the specified value. |
Value |
multiply(Value x)
Multiply the specified value by the current short value. |
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()
return the short value. |
Value |
sub(Value x)
Substracts the specified value to the current short value. |
Numeric |
toNumeric()
Convert the value into the numeric type. |
String |
toString()
Prints the value of the Short in a character string. |
Value |
unaryMinus()
Returns a Value containing the opposite of the current 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 |
| Constructor Detail |
|---|
public UnsignedShort(short value)
value - the value of the UnsignedShort.public UnsignedShort(int value)
value - the value of the Short.| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getFormattedString(int length)
getFormattedString in interface ValueFormatlength - The expected length of the output string
public byte[] getFormattedBuffer()
getFormattedBuffer in interface ValueFormatpublic final int getType()
getType in interface Valuepublic final int getPriority()
getPriority in interface Value
public final Value convertTo(int type)
throws ClassCastException
convertTo in interface Valuetype - the type in which convert
ClassCastException - if the conversion is impossiblepublic void assign(Value v)
assign in interface Valuev - the new Valuepublic Value unaryMinus()
unaryMinus in interface Arithmeticpublic final Value add(Value x)
add in interface Sumablex - another value.
public Value sub(Value x)
sub in interface Arithmeticx - another value.
public Value multiply(Value x)
multiply in interface Arithmeticx - another value.
public final Value divide(Value x)
divide in interface Arithmeticx - another value.
public Value modulus(Value x)
modulus in interface Arithmeticx - another value.
public int compareTo(Value x)
compareTo in interface Comparisonx - the Value to compare
public final boolean booleanValue()
booleanValue in interface Logicpublic final byte byteValue()
byteValue in interface Numericpublic final int intValue()
intValue in interface Numericpublic final long longValue()
longValue in interface Numericpublic final short shortValue()
shortValue in interface Numericpublic final float floatValue()
floatValue in interface Numericpublic final double doubleValue()
doubleValue in interface Numericpublic final void assign(boolean value)
assign in interface Numericvalue - the new value to assignpublic final void assign(byte value)
assign in interface Numericvalue - the new value to assignpublic final void assign(int value)
assign in interface Numericvalue - the new value to assignpublic final void assign(short value)
assign in interface Numericvalue - the new value to assignpublic final void assign(long value)
assign in interface Numericvalue - the new value to assignpublic final void assign(float value)
assign in interface Numericvalue - the new value to assignpublic final void assign(double value)
assign in interface Numericvalue - the new value to assignpublic 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 impossibleprotected BigInteger integerValue()
protected BigDecimal decimalValue()
public 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 | |||||||||