Package org.apache.pivot.collections
Class ArrayAdapter<T>
- java.lang.Object
-
- org.apache.pivot.collections.ReadOnlySequence<T>
-
- org.apache.pivot.collections.ArrayAdapter<T>
-
- Type Parameters:
T- The underlying type of the array objects.
- All Implemented Interfaces:
java.io.Serializable,Sequence<T>
public class ArrayAdapter<T> extends ReadOnlySequence<T> implements java.io.Serializable
A read-only implementation of theSequenceinterface that wraps an array.Used to interface between a Java array and a Pivot control that expects a
Sequenceof objects (such as aTablePane,Menu,ListViewor similar).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
-
-
Constructor Summary
Constructors Constructor Description ArrayAdapter(T... array)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget(int index)Retrieves the item at the given index.intgetLength()Returns the length of the sequence.intindexOf(T item)Returns the index of an item in the sequence.-
Methods inherited from class org.apache.pivot.collections.ReadOnlySequence
add, defaultException, insert, remove, remove, update
-
-
-
-
Constructor Detail
-
ArrayAdapter
public ArrayAdapter(T... array)
-
-