|
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.AbstractValueArray
fr.gael.drb.value.AbstractNumericArray
fr.gael.drb.value.UnsignedShortArray
public class UnsignedShortArray
The UnsignedShortArray class is a generic wrapper for unsigned short array 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 | |
|---|---|
UnsignedShortArray(int size)
Build a ShortArray value. |
|
UnsignedShortArray(short[] v)
Build an UnsignedShortArray value. |
|
| Method Summary | |
|---|---|
void |
assign(int index,
boolean value)
assign |
void |
assign(int index,
byte value)
assign |
void |
assign(int index,
double value)
assign |
void |
assign(int index,
float value)
assign |
void |
assign(int index,
int value)
assign |
void |
assign(int index,
long value)
assign |
void |
assign(int index,
short value)
assign |
void |
assign(int index,
Value element)
assign |
void |
assign(Value v)
Assign a value. |
boolean |
booleanValue(int index)
booleanValue |
byte |
byteValue(int index)
byteValue |
Value |
convertTo(int type)
Convert the value into the specified type. |
double |
doubleValue(int index)
doubleValue |
float |
floatValue(int index)
floatValue |
int |
getArrayType()
getArrayType |
short[] |
getData()
Returns the underlying object for optimization. |
Value |
getElement(int index)
get the element |
byte[] |
getFormattedBuffer()
Return a byte buffer containing the value in a fixed format. |
String |
getFormattedString(int length)
Return 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 ShortArray priority The type must be ARRAY_ID or STRING_ID otherwise a ClassCastException is thrown. |
int |
getType()
The type identifier of this BooleanArray value. |
Value |
getValue()
The value of the item. |
int |
intValue(int index)
intValue |
int |
length()
Return the length |
long |
longValue(int index)
longValue |
static void |
main(String[] args)
mian |
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(int index)
shortValue |
short[] |
shortValues()
Returns this value as a short integer (signed 16 bits). |
Numeric |
toNumeric()
Convert the value into the numeric type. |
String |
toString()
toString |
static UnsignedShortArray |
wrap(short[] v)
Wrap the given array |
| Methods inherited from class fr.gael.drb.value.AbstractNumericArray |
|---|
booleanValues, byteValues, convertArrayTo, doubleValues, floatValues, intValues, longValues |
| Methods inherited from class fr.gael.drb.value.AbstractValueArray |
|---|
addItem, atomize, compareTo, getItem, getLength, removeItem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fr.gael.drb.DrbItem |
|---|
getItemType, getName, getNamespaceURI, getValue, rename, setNamespaceURI, setValue |
| Methods inherited from interface fr.gael.drb.DrbSequence |
|---|
addItem, atomize, getItem, getLength, removeItem |
| Methods inherited from interface fr.gael.drb.value.Comparison |
|---|
compareTo |
| Constructor Detail |
|---|
public UnsignedShortArray(short[] v)
v - a short array.public UnsignedShortArray(int size)
size - The size| Method Detail |
|---|
public static UnsignedShortArray wrap(short[] v)
v -
public final short[] getData()
getData in class AbstractNumericArraypublic short[] shortValues()
shortValues in class AbstractNumericArraypublic String getFormattedString(int length)
getFormattedString in interface ValueFormatgetFormattedString in class AbstractNumericArraylength - The expected length of the output string
public final byte[] getFormattedBuffer()
getFormattedBuffer in interface ValueFormatgetFormattedBuffer in class AbstractNumericArraypublic 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 ValueconvertTo in class AbstractValueArraytype - The target type.
ClassCastException - exception
public final void assign(Value v)
throws ClassCastException
assign in interface Valuev - the value to be assigned.
ClassCastException - exceptionpublic final int getArrayType()
getArrayType in interface ValueArraygetArrayType in class AbstractNumericArraypublic final Value getElement(int index)
getElement in interface ValueArrayindex - the index
public final void assign(int index,
Value element)
assign in interface ValueArrayindex - the indexelement - the elementpublic final int length()
length in interface ValueArraypublic final boolean booleanValue(int index)
booleanValue in interface NumericArraybooleanValue in class AbstractNumericArrayindex - the index
public final byte byteValue(int index)
byteValue in interface NumericArraybyteValue in class AbstractNumericArrayindex - the index
public final int intValue(int index)
intValue in interface NumericArrayintValue in class AbstractNumericArrayindex - the index
public final long longValue(int index)
longValue in interface NumericArraylongValue in class AbstractNumericArrayindex - the index
public final short shortValue(int index)
shortValue in interface NumericArrayshortValue in class AbstractNumericArrayindex - the index
public final float floatValue(int index)
floatValue in interface NumericArrayfloatValue in class AbstractNumericArrayindex - the index
public final double doubleValue(int index)
doubleValue in interface NumericArraydoubleValue in class AbstractNumericArrayindex - the index
public final void assign(int index,
boolean value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the boolean value
public final void assign(int index,
byte value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the byte value
public final void assign(int index,
int value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the int value
public final void assign(int index,
short value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the short value
public final void assign(int index,
long value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the long value
public final void assign(int index,
float value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the float value
public final void assign(int index,
double value)
assign in interface NumericArrayassign in class AbstractNumericArrayindex - the indexvalue - the double valuepublic String toString()
toString in class Objectpublic static void main(String[] args)
args - string[]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.
public Numeric toNumeric()
throws ClassCastException
ClassCastException - is the convertion is impossible
|
Data Request Broker - DRB API® 2-3-release |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||