Class NCList

java.lang.Object
com.adobe.versioncue.nativecomm.msg.NCType
com.adobe.versioncue.nativecomm.msg.NCList
All Implemented Interfaces:
INCExternalizable, Iterable<NCType>

public final class NCList extends NCType implements Iterable<NCType>
List of NCType objects. Note that this class is **NOT** Thread-safe in its current form.
  • Constructor Details

    • NCList

      public NCList()
      Constructs a new NCList object.
    • NCList

      public NCList(int initialCapacity)
      Constructs a new NCList object.
      Parameters:
      initialCapacity - - initial capacity of the created Array object
  • Method Details

    • size

      public int size()
      Returns the size of this NCList object.
      Returns:
      the size of this NCList object
    • isEmtpy

      public boolean isEmtpy()
      Returns true if this NCList object contains no items.
      Returns:
      true if this NCList object contains no items
    • get

      public NCType get(int index)
      Returns the NCType located at the specified index inside this NCList.
      Parameters:
      index - the index of the NCType to return
      Returns:
      the NCType located at the specified index inside this NCList
    • get

      public NCType[] get()
      Returns the elements of this NCList instance as NCType[].
      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(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(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(ByteBuffer value)
      Appends a value to the NCList.
      Parameters:
      value - the value
      Returns:
      the NCList
    • getString

      public String getString(int index) throws BadMessageException
      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

      public boolean getBool(int index) throws BadMessageException
      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

      public double getDouble(int index) throws BadMessageException
      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

      public int getInt(int index) throws BadMessageException
      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

      public long getLong(int index) throws BadMessageException
      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

      public Date getDate(int index) throws BadMessageException
      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

      public byte[] getByteArray(int index) throws BadMessageException
      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

      public ByteBuffer getBytes(int index) throws BadMessageException
      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

      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 the NCType object 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

      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 Iterator<NCType> iterator()
      Specified by:
      iterator in interface Iterable<NCType>
      See Also:
    • getType

      public int getType()
      Description copied from class: NCType
      Returns the type of this NCType object.
      Specified by:
      getType in class NCType
      Returns:
      the type of this NCType
    • hashCode

      public int hashCode()
      Description copied from class: NCType
      Force subclasses to implement.
      Specified by:
      hashCode in class NCType
      See Also:
    • equals

      public boolean equals(Object other)
      Description copied from class: NCType
      Force subclasses to implement.
      Specified by:
      equals in class NCType
      See Also:
    • toString

      public String toString()
      Description copied from class: NCType
      Force subclasses to implement.
      Specified by:
      toString in class NCType
      See Also: