Package snap.util

Class ObjectArray<T>

java.lang.Object
snap.util.ObjectArray<T>
All Implemented Interfaces:
Cloneable

public abstract class ObjectArray<T> extends Object implements Cloneable
This class manages an array of object values.
  • Field Details

    • _array

      protected T[] _array
    • _length

      protected int _length
  • Constructor Details

    • ObjectArray

      public ObjectArray(Class<T> aClass)
      Constructor.
    • ObjectArray

      public ObjectArray(T[] anArray)
      Constructor.
  • Method Details

    • length

      public final int length()
      Returns the length.
    • setLength

      public void setLength(int aValue)
      Sets the length.
    • getValue

      public T getValue(int anIndex)
      Returns the Object value at index.
    • setValue

      public void setValue(T aValue, int anIndex)
      Sets the String value at index.
    • addValue

      public void addValue(T aValue)
      Adds the value at index.
    • addValue

      public void addValue(T aValue, int anIndex)
      Adds the value at index.
    • removeIndex

      public void removeIndex(int anIndex)
      Removes the float value at index.
    • getArray

      public T[] getArray()
      Returns the simple array (trimmed to length).
    • getComponentClass

      public Class<T> getComponentClass()
      Returns the component class.
    • clone

      protected ObjectArray clone()
      Standard clone implementation.
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object
    • toStringProps

      public String toStringProps()
      Standard toStringProps implementation.