Package COM.activesw.api.client
Class NativeSequence
- java.lang.Object
-
- COM.activesw.api.client.NativeSequence
-
public class NativeSequence extends java.lang.Object
Native Java implementation of a sequence field value
-
-
Field Summary
Fields Modifier and Type Field Description static NativeSequence
EMPTY_BOOLEAN_SEQUENCE
static NativeSequence
EMPTY_BYTE_SEQUENCE
static NativeSequence
EMPTY_CHAR_SEQUENCE
static NativeSequence
EMPTY_DATE_SEQUENCE
static NativeSequence
EMPTY_DOUBLE_SEQUENCE
static NativeSequence
EMPTY_FLOAT_SEQUENCE
static NativeSequence
EMPTY_INT_SEQUENCE
static NativeSequence
EMPTY_LONG_SEQUENCE
static NativeSequence
EMPTY_SEQUENCE_SEQUENCE
static NativeSequence
EMPTY_SHORT_SEQUENCE
static NativeSequence
EMPTY_STRING_SEQUENCE
static NativeSequence
EMPTY_STRUCT_SEQUENCE
static NativeSequence
EMPTY_UNICODE_CHAR_SEQUENCE
static NativeSequence
EMPTY_UNICODE_STRING_SEQUENCE
-
Constructor Summary
Constructors Constructor Description NativeSequence(short type, int length, java.lang.String fieldName)
Constructs a sequence field of the specified element type and lengthNativeSequence(short type, java.lang.String fieldName)
Constructs a zero length sequence of the specified element type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
duplicate()
boolean
elementExists(int index)
Returns true if the element at the specified index exists.void
ensureLength(int length)
Ensures that the length of the sequence is greater than or equal to the specified length.java.lang.Object
getElement(int index)
Gets an element of the sequencejava.lang.Class
getElementClass()
Gets the class for element type of the sequencejava.lang.Object
getElements(int offset, int count)
Gets multiple elements of the sequenceshort
getElementType()
Gets the element type of the sequencestatic NativeSequence
getEmptySequence(short type)
int
getLength()
Gets the length of the sequencevoid
setElement(int index, java.lang.Object value)
Sets an element of the sequence, growing the sequence if necessaryvoid
setElements(int srcOffset, int destOffset, int count, java.lang.Object src)
Sets multiple elements of the sequence, growing the sequence if necessaryvoid
setLength(int newLength)
Sets the length of the sequence.
-
-
-
Field Detail
-
EMPTY_BOOLEAN_SEQUENCE
public static NativeSequence EMPTY_BOOLEAN_SEQUENCE
-
EMPTY_BYTE_SEQUENCE
public static NativeSequence EMPTY_BYTE_SEQUENCE
-
EMPTY_SHORT_SEQUENCE
public static NativeSequence EMPTY_SHORT_SEQUENCE
-
EMPTY_INT_SEQUENCE
public static NativeSequence EMPTY_INT_SEQUENCE
-
EMPTY_LONG_SEQUENCE
public static NativeSequence EMPTY_LONG_SEQUENCE
-
EMPTY_FLOAT_SEQUENCE
public static NativeSequence EMPTY_FLOAT_SEQUENCE
-
EMPTY_DOUBLE_SEQUENCE
public static NativeSequence EMPTY_DOUBLE_SEQUENCE
-
EMPTY_DATE_SEQUENCE
public static NativeSequence EMPTY_DATE_SEQUENCE
-
EMPTY_CHAR_SEQUENCE
public static NativeSequence EMPTY_CHAR_SEQUENCE
-
EMPTY_UNICODE_CHAR_SEQUENCE
public static NativeSequence EMPTY_UNICODE_CHAR_SEQUENCE
-
EMPTY_STRING_SEQUENCE
public static NativeSequence EMPTY_STRING_SEQUENCE
-
EMPTY_UNICODE_STRING_SEQUENCE
public static NativeSequence EMPTY_UNICODE_STRING_SEQUENCE
-
EMPTY_STRUCT_SEQUENCE
public static NativeSequence EMPTY_STRUCT_SEQUENCE
-
EMPTY_SEQUENCE_SEQUENCE
public static NativeSequence EMPTY_SEQUENCE_SEQUENCE
-
-
Constructor Detail
-
NativeSequence
public NativeSequence(short type, java.lang.String fieldName)
Constructs a zero length sequence of the specified element type
-
NativeSequence
public NativeSequence(short type, int length, java.lang.String fieldName)
Constructs a sequence field of the specified element type and length- Parameters:
type
- - sequence element typelength
- - number of elements
-
-
Method Detail
-
elementExists
public boolean elementExists(int index) throws BrokerException
Returns true if the element at the specified index exists.- Parameters:
index
- the index of the element to test- Throws:
BrokerException
-
ensureLength
public void ensureLength(int length) throws BrokerException
Ensures that the length of the sequence is greater than or equal to the specified length.- Parameters:
length
- - the new sequence length- Throws:
BrokerException
-
getElement
public java.lang.Object getElement(int index) throws BrokerOutOfRangeException
Gets an element of the sequence- Parameters:
index
- - zero based sequence index- Returns:
- element of the sequence
- Throws:
BrokerOutOfRangeException
-
getElements
public java.lang.Object getElements(int offset, int count) throws BrokerException
Gets multiple elements of the sequence- Parameters:
offset
- - starting at zero based sequence indexcount
- - the number of elements to get- Returns:
- array of sequence elements
- Throws:
java.lang.IndexOutOfBoundsException
BrokerException
-
getElementClass
public java.lang.Class getElementClass()
Gets the class for element type of the sequence- Returns:
- Class of sequence
-
getElementType
public short getElementType()
Gets the element type of the sequence- Returns:
- type of sequence
-
getLength
public int getLength()
Gets the length of the sequence- Returns:
- length of sequence
-
setElement
public void setElement(int index, java.lang.Object value) throws BrokerException
Sets an element of the sequence, growing the sequence if necessary- Parameters:
index
- - zero based sequence indexvalue
- - element value- Throws:
BrokerException
-
setElements
public void setElements(int srcOffset, int destOffset, int count, java.lang.Object src) throws BrokerException
Sets multiple elements of the sequence, growing the sequence if necessary- Parameters:
srcOffset
- - zero-based index of first src elementdestOffset
- - zero-based index of first dest elementcount
- - the number of elements to setsrc
- - the source elements- Throws:
BrokerException
-
setLength
public void setLength(int newLength) throws BrokerException
Sets the length of the sequence.- Parameters:
newLength
- - the new length- Throws:
BrokerException
-
duplicate
protected java.lang.Object duplicate() throws BrokerException
- Throws:
BrokerException
-
getEmptySequence
public static NativeSequence getEmptySequence(short type)
-
-