Class NCList
java.lang.Object
com.adobe.versioncue.nativecomm.msg.NCType
com.adobe.versioncue.nativecomm.msg.NCList
- All Implemented Interfaces:
INCExternalizable,Iterable<NCType>
List of NCType objects.
Note that this class is **NOT** Thread-safe in its current form.
-
Field Summary
Fields inherited from class com.adobe.versioncue.nativecomm.msg.NCType
TYPE_BOOLEAN, TYPE_BYTEBUFFER, TYPE_DATE, TYPE_DOUBLE, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_MAP, TYPE_NULL, TYPE_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(boolean value) Appends a value to the NCList.add(byte[] value) Appends a value to the NCList.add(double value) Appends a value to the NCList.add(int value) Appends a value to the NCList.add(long value) Appends a value to the NCList.add(INCExternalizable value) Appends a value to the NCList.Appends the specified NCType to the end of this NCList.Appends a value to the NCList.add(ByteBuffer value) Appends a value to the NCList.Appends a value to the NCList.clear()Removes all Values from this NCList.booleanReturns true if this Array contains the specified NCType.booleanForce subclasses to implement.NCType[]get()Returns the elements of this NCList instance asNCType[].get(int index) Returns theNCTypelocated at the specified index inside this NCList.booleangetBool(int index) Returns the boolean value at the specified index.byte[]getByteArray(int index) Returns the byte[] value at the specified index.getBytes(int index) Returns the ByteBuffer value at the specified index.getDate(int index) Returns the date value at the specified index.doublegetDouble(int index) Returns the double value at the specified index.intgetInt(int index) Returns the int value at the specified index.getList(int index) Returns the NCList value at the specified index.longgetLong(int index) Returns the long value at the specified index.getMap(int index) Returns the NCMap value at the specified index.getString(int index) Returns the String value at the specified index.intgetType()Returns the type of thisNCTypeobject.inthashCode()Force subclasses to implement.booleanisEmtpy()Returns true if thisNCListobject contains no items.iterator()remove(int index) Removes the NCType at the specified position in this NCList and returns it.Replaces theNCTypeobject at the specified index inside the NCList.intsize()Returns the size of thisNCListobject.toString()Force subclasses to implement.Methods inherited from class com.adobe.versioncue.nativecomm.msg.NCType
externalizeMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
NCList
public NCList()Constructs a newNCListobject. -
NCList
public NCList(int initialCapacity) Constructs a newNCListobject.- Parameters:
initialCapacity- - initial capacity of the created Array object
-
-
Method Details
-
size
public int size()Returns the size of thisNCListobject.- Returns:
- the size of this
NCListobject
-
isEmtpy
public boolean isEmtpy()Returns true if thisNCListobject contains no items.- Returns:
- true if this
NCListobject contains no items
-
get
Returns theNCTypelocated at the specified index inside this NCList.- Parameters:
index- the index of the NCType to return- Returns:
- the
NCTypelocated at the specified index inside this NCList
-
get
Returns the elements of this NCList instance asNCType[].- Returns:
- elements of this NCList instance as
NCType[].
-
contains
Returns true if this Array contains the specified NCType.- Parameters:
val- - NCType to look for- Returns:
- true if this Array contains the specified NCType
-
add
Appends the specified NCType to the end of this NCList.- Parameters:
value- - NCType to be added- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
getString
Returns the String value at the specified index.- Parameters:
index- the index- Returns:
- String value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getBool
Returns the boolean value at the specified index.- Parameters:
index- the index- Returns:
- boolean value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getDouble
Returns the double value at the specified index.- Parameters:
index- the index- Returns:
- double value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getInt
Returns the int value at the specified index.- Parameters:
index- the index- Returns:
- int value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getLong
Returns the long value at the specified index.- Parameters:
index- the index- Returns:
- long value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getDate
Returns the date value at the specified index.- Parameters:
index- the index- Returns:
- date value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getByteArray
Returns the byte[] value at the specified index.- Parameters:
index- the index- Returns:
- byte[] value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getBytes
Returns the ByteBuffer value at the specified index.- Parameters:
index- the index- Returns:
- ByteBuffer value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getList
Returns the NCList value at the specified index.- Parameters:
index- the index- Returns:
- NCList value
- Throws:
BadMessageException- if the requested value is of a bad type
-
getMap
Returns the NCMap value at the specified index.- Parameters:
index- the index- Returns:
- NCMap value
- Throws:
BadMessageException- if the requested value is of a bad type
-
set
Replaces theNCTypeobject at the specified index inside the NCList.- Parameters:
value- - NCType to be stored at the specified position.index- of element to replace.- Returns:
- the NCList
-
clear
Removes all Values from this NCList.- Returns:
- the NCList
-
remove
Removes the NCType at the specified position in this NCList and returns it. Shifts any subsequent values to the left (subtracts one from their indices).- Parameters:
index- the index of the element to removed- Returns:
- the removed NCType object
-
iterator
-
getType
public int getType()Description copied from class:NCTypeReturns the type of thisNCTypeobject. -
hashCode
public int hashCode()Description copied from class:NCTypeForce subclasses to implement. -
equals
Description copied from class:NCTypeForce subclasses to implement. -
toString
Description copied from class:NCTypeForce subclasses to implement.
-