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 theSequence
interface that wraps an array.Used to interface between a Java array and a Pivot control that expects a
Sequence
of objects (such as aTablePane
,Menu
,ListView
or 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 T
get(int index)
Retrieves the item at the given index.int
getLength()
Returns the length of the sequence.int
indexOf(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)
-
-