Class NCList
- java.lang.Object
-
- com.adobe.versioncue.nativecomm.msg.NCType
-
- com.adobe.versioncue.nativecomm.msg.NCList
-
- All Implemented Interfaces:
INCExternalizable,java.lang.Iterable<NCType>
public final class NCList extends NCType implements java.lang.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NCListadd(boolean value)Appends a value to the NCList.NCListadd(byte[] value)Appends a value to the NCList.NCListadd(double value)Appends a value to the NCList.NCListadd(int value)Appends a value to the NCList.NCListadd(long value)Appends a value to the NCList.NCListadd(INCExternalizable value)Appends a value to the NCList.NCListadd(NCType value)Appends the specified NCType to the end of this NCList.NCListadd(java.lang.String value)Appends a value to the NCList.NCListadd(java.nio.ByteBuffer value)Appends a value to the NCList.NCListadd(java.util.Date value)Appends a value to the NCList.NCListclear()Removes all Values from this NCList.booleancontains(NCType val)Returns true if this Array contains the specified NCType.booleanequals(java.lang.Object other)Force subclasses to implement.NCType[]get()Returns the elements of this NCList instance asNCType[].NCTypeget(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.java.nio.ByteBuffergetBytes(int index)Returns the ByteBuffer value at the specified index.java.util.DategetDate(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.NCListgetList(int index)Returns the NCList value at the specified index.longgetLong(int index)Returns the long value at the specified index.NCMapgetMap(int index)Returns the NCMap value at the specified index.java.lang.StringgetString(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.java.util.Iterator<NCType>iterator()NCTyperemove(int index)Removes the NCType at the specified position in this NCList and returns it.NCListset(NCType value, int index)Replaces theNCTypeobject at the specified index inside the NCList.intsize()Returns the size of thisNCListobject.java.lang.StringtoString()Force subclasses to implement.-
Methods inherited from class com.adobe.versioncue.nativecomm.msg.NCType
externalize
-
-
-
-
Method Detail
-
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
public NCType get(int index)
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
public NCType[] get()
Returns the elements of this NCList instance asNCType[].- Returns:
- elements of this NCList instance as
NCType[].
-
contains
public boolean contains(NCType val)
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
public NCList add(NCType value)
Appends the specified NCType to the end of this NCList.- Parameters:
value- - NCType to be added- Returns:
- the NCList
-
add
public NCList add(INCExternalizable value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(java.lang.String value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(boolean value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(int value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(long value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(double value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(java.util.Date value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(byte[] value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
add
public NCList add(java.nio.ByteBuffer value)
Appends a value to the NCList.- Parameters:
value- the value- Returns:
- the NCList
-
getString
public java.lang.String getString(int index) throws BadMessageExceptionReturns 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
public boolean getBool(int index) throws BadMessageExceptionReturns 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
public double getDouble(int index) throws BadMessageExceptionReturns 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
public int getInt(int index) throws BadMessageExceptionReturns 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
public long getLong(int index) throws BadMessageExceptionReturns 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
public java.util.Date getDate(int index) throws BadMessageExceptionReturns 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
public byte[] getByteArray(int index) throws BadMessageExceptionReturns 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
public java.nio.ByteBuffer getBytes(int index) throws BadMessageExceptionReturns 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
public NCList getList(int index) throws BadMessageException
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
public NCMap getMap(int index) throws BadMessageException
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
public NCList set(NCType value, int index)
Replaces theNCTypeobject at the specified index inside the NCList.- Parameters:
index- of element to replace.value- - NCType to be stored at the specified position.- Returns:
- the NCList
-
clear
public NCList clear()
Removes all Values from this NCList.- Returns:
- the NCList
-
remove
public NCType remove(int index)
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
public java.util.Iterator<NCType> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<NCType>- See Also:
Iterable.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
public boolean equals(java.lang.Object other)
Description copied from class:NCTypeForce subclasses to implement.
-
-