Package snap.util
Class ObjectArray<T>
java.lang.Object
snap.util.ObjectArray<T>
- All Implemented Interfaces:
Cloneable
This class manages an array of object values.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionObjectArray
(Class<T> aClass) Constructor.ObjectArray
(T[] anArray) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the value at index.void
Adds the value at index.protected ObjectArray<T>
clone()
Standard clone implementation.get
(int anIndex) Returns the Object value at index.T[]
getArray()
Returns the simple array (trimmed to length).Returns the component class.getLast()
Returns the last item.final int
length()
Returns the length.void
removeIndex
(int anIndex) Removes the float value at index.void
Sets the String value at index.void
setLength
(int aValue) Sets the length.toString()
Standard toString implementation.Standard toStringProps implementation.
-
Field Details
-
_array
-
_length
protected int _length
-
-
Constructor Details
-
ObjectArray
Constructor. -
ObjectArray
Constructor.
-
-
Method Details
-
length
public final int length()Returns the length. -
setLength
public void setLength(int aValue) Sets the length. -
get
Returns the Object value at index. -
set
Sets the String value at index. -
add
Adds the value at index. -
add
Adds the value at index. -
removeIndex
public void removeIndex(int anIndex) Removes the float value at index. -
getArray
Returns the simple array (trimmed to length). -
getLast
Returns the last item. -
getComponentClass
Returns the component class. -
clone
Standard clone implementation. -
toString
Standard toString implementation. -
toStringProps
Standard toStringProps implementation.
-