public class IRISList extends Object
| Constructor and Description |
|---|
IRISList()
Create an empty IRISList.
|
IRISList(boolean enableCompactDouble)
Create an empty IRISList using the given compact double flag.
|
IRISList(byte[] buffer)
Create an IRISList from the provided buffer with the default character set name.
|
IRISList(byte[] buffer,
int length)
Create an IRISList from the provided buffer with the default character set name.
|
IRISList(byte[] buffer,
int length,
String charSet)
Create an IRISList from the provided buffer with default character set name.
|
IRISList(byte[] buffer,
int length,
String charSet,
boolean enableCompactDouble)
Create an IRISList from the provided buffer with provided character set name and compact double flag.
|
IRISList(byte[] buffer,
String charSet)
Create an IRISList from the provided buffer with provided character set name.
|
IRISList(IRISList list)
Create a copy of the provided list.
|
IRISList(String charSet,
boolean enableCompactDouble)
Create an empty IRISList using the given character set name and compact double flag.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(BigDecimal value)
Append BigDecimal value to the end of the list.
|
void |
add(BigInteger value)
Append BigInteger value to the end of the list.
|
void |
add(boolean value)
Append boolean value to the end of the list.
|
void |
add(Boolean value)
Append Boolean value to the end of the list.
|
void |
add(byte[] value)
Append byte[] to the the end of the list.
|
void |
add(byte[] value,
int length)
Append first lenght bytes from byte[] to the the end of the list.
|
void |
add(Collection collection)
Appends all of the elements in the specified collection to the end of
this list, in same order that they are returned by the specified
collection's iterator.
|
void |
add(double value)
Append double value to the end of the list.
|
void |
add(Double value)
Append Double value to the end of the list.
|
void |
add(float value)
Append float value to the end of the list.
|
void |
add(Float value)
Append Float value to the end of the list.
|
void |
add(int value)
Append int value to the end of the list.
|
void |
add(Integer value)
Append Integer value to the end of the list.
|
void |
add(IRISList list)
Append IRISList value to the end of the list.
|
void |
add(long value)
Append long value to the end of the list.
|
void |
add(Long value)
Append Long value to the end of the list.
|
void |
add(Object value)
Append value to the end of the list.
|
void |
add(Object[] array)
Appends all of the elements in the specified array to the end of
this list.
|
void |
add(short value)
Append short value to the end of the list.
|
void |
add(Short value)
Append Short value to the end of the list.
|
void |
add(String value)
Append String value to the end of the list.
|
void |
addEmpty()
Append empty to end of the list.
|
void |
addNull()
Append null to end of the list.
|
void |
clear()
Resets the list by removing all elements from the list.
|
IRISList |
concat(IRISList list)
Create a new IRISList by appending
specified list to the end of this IRISList.
|
int |
count()
Return number of elements in the list.
|
static int |
DateToHorolog(Date value,
Calendar calendar)
Convert Date to Horolog.
|
boolean |
equals(Object list)
Compares the specified list with this list for equality.
|
Object |
get(int index)
Get element at given index as an Object.
|
BigDecimal |
getBigDecimal(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
BigInteger |
getBigInteger(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
Boolean |
getBoolean(int index)
Get element at given index as Boolean.
|
byte[] |
getBuffer() |
byte[] |
getBytes(int index)
Returns copy of byte array value of element at index.
|
String |
getCharSet()
get IRISList Charset Name, dafault null
|
Double |
getDouble(int index)
Returns the $list item in the buffer at index, index set to next
element
|
Float |
getFloat(int index)
Returns the $list item in the buffer at index, index set to next
element
|
Integer |
getInteger(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
IRISList |
getList(int index)
Get current element at given index as IRISList.
|
Long |
getLong(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
Short |
getShort(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
String |
getString(int index)
Returns the $list item in the buffer at index, index set to next
element.
|
int |
hashCode() |
static Date |
HorologToDate(int HorologValue,
Calendar calendar)
Convert Horolog to Date.
|
static Time |
HorologToTime(int HorologValue,
Calendar calendar)
Convert Horolog to Time.
|
boolean |
isCompactDoubleEnabled()
Checks whether
double and float values will be written in compact form. |
static Timestamp |
PosixToTimestamp(long PosixValue,
Calendar calendar)
Convert long to Timestamp.
|
boolean |
remove(int index)
Remove element at index from the list.
|
void |
set(int index,
Object value)
Set or update the given element with an value.
|
void |
set(int index,
Object[] value)
Set or update the given elements.
|
void |
setCharSet(String charSet)
set IRISList Charset Name
|
void |
setCompactDoubleEnabled(boolean value)
Enables or disables writing
double and float values to this list in compact form. |
int |
size()
Return the size of the list - number of bytes used by IRISlist
|
IRISList |
subList(int from,
int to)
Return a new IRISList that is obtained by getting all the elements of
this list starting at from index, and ending at to index.
|
static long |
TimestampToPosix(Timestamp Value,
Calendar calendar)
Convert Timetsamp to Posix.
|
static int |
TimeToHorolog(Time value,
Calendar calendar)
Convert Time to Horolog.
|
Object[] |
toArray()
Returns an array of Objects containing all of the elements in this list.
|
ArrayList<Object> |
toList()
Returns a java.util.List containing all of the elements in this list.
|
String |
toString()
Returns the visual representation of buffer as $list.
|
public IRISList()
public IRISList(boolean enableCompactDouble)
enableCompactDouble - if true write double and float values in compact form.public IRISList(String charSet, boolean enableCompactDouble)
charSet - character set nameenableCompactDouble - if true write double and float values in compact form.public IRISList(IRISList list)
list - IRISList to copypublic IRISList(byte[] buffer,
int length)
buffer - buffer to be allocatedlength - initial buffer size to be allocatedpublic IRISList(byte[] buffer)
buffer - buffer to be allocatedpublic IRISList(byte[] buffer,
int length,
String charSet)
buffer - buffer to be allocatedlength - initial buffer size to be allocatedcharSet - character set namepublic IRISList(byte[] buffer,
String charSet)
buffer - buffer to be allocatedcharSet - character set namepublic IRISList(byte[] buffer,
int length,
String charSet,
boolean enableCompactDouble)
buffer - buffer to be allocatedlength - initial buffer size to be allocatedcharSet - character set nameenableCompactDouble - if true write double and float values in compact form.public String getCharSet()
public void setCharSet(String charSet)
charSet - Charset Namepublic boolean isCompactDoubleEnabled()
double and float values will be written in compact form.true if compaction is enabled; false otherwise.public void setCompactDoubleEnabled(boolean value)
double and float values to this list in compact form.value - true to enable creating double and float values in compact form; false otherwise.public Object get(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (less then 1
or pass the end of the list)public Boolean getBoolean(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public Double getDouble(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public Float getFloat(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public Integer getInteger(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public Long getLong(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public Short getShort(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public BigInteger getBigInteger(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public BigDecimal getBigDecimal(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public String getString(int index)
index - indexIndexOutOfBoundsException - if the index is out of range (negative
or greater than size())public byte[] getBytes(int index)
index - indexpublic IRISList getList(int index)
index - index to list elementIndexOutOfBoundsException - if the index is out of range (less then 1
or pass the end of the list)public void addNull()
public void addEmpty()
public void add(int value)
value - int valuepublic void add(Integer value)
value - Integer valuepublic void add(short value)
value - short valuepublic void add(Short value)
value - Short valuepublic void add(String value)
value - String valuepublic void add(long value)
value - long valuepublic void add(Long value)
value - Long valuepublic void add(double value)
value - double valuepublic void add(Double value)
value - Double valuepublic void add(float value)
value - float valuepublic void add(Float value)
value - Float valuepublic void add(byte[] value)
value - byte[] valuepublic void add(byte[] value,
int length)
value - byte[] valuelength - number of bytes to be addedpublic void add(IRISList list)
list - IRISList valueIllegalArgumentException - if isCompactDoubleEnabled()
is false for this list, but
is true for the list to be added.public void add(boolean value)
value - boolean valuepublic void add(Boolean value)
value - Boolean valuepublic void add(BigInteger value)
value - BigInteger valuepublic void add(BigDecimal value)
value - BigDecimal valuepublic void add(Object value)
value - Object valuepublic void add(Object[] array)
array - object array to be appendedpublic void add(Collection collection)
collection - collectionpublic void set(int index,
Object value)
index - indexvalue - Object valueIndexOutOfBoundsException - if the index is less than 1public void set(int index,
Object[] value)
index - indexvalue - Object valueIndexOutOfBoundsException - if the index is less than 1public int size()
public int count()
public void clear()
public boolean remove(int index)
index - indexpublic IRISList subList(int from, int to)
from - from indexto - to indexIndexOutOfBoundsException - - for an illegal index value (from is greater than count(),
to less than from)public Object[] toArray()
public IRISList concat(IRISList list)
list - IRISList to be addedIllegalArgumentException - if isCompactDoubleEnabled()
is false for this list, but
is true for the list to be appended.public ArrayList<Object> toList()
public boolean equals(Object list)
public static Timestamp PosixToTimestamp(long PosixValue, Calendar calendar)
PosixValue - longcalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic static long TimestampToPosix(Timestamp Value, Calendar calendar)
Value - Timestampcalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic static Date HorologToDate(int HorologValue, Calendar calendar)
HorologValue - intcalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic static int DateToHorolog(Date value, Calendar calendar)
value - Datecalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic static Time HorologToTime(int HorologValue, Calendar calendar)
HorologValue - intcalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic static int TimeToHorolog(Time value, Calendar calendar)
value - Timecalendar - Calendar, used to determine GMT and DST offsets. Can be null for default calendarpublic String toString()
public byte[] getBuffer()
Copyright © 2000-2024 InterSystems Corporation. All rights reserved.