xxl.collections
Interface Array
- All Known Implementing Classes:
- ArrayQueue, AbstractArray
- public abstract interface Array
|
Method Summary |
java.lang.Object |
get(int index)
Returns the Object at position index. |
void |
set(int index,
java.lang.Object object)
Sets the Object at position index
to object. |
int |
size()
Returns the size of the Array. |
FACTORY_METHOD
public static final Function FACTORY_METHOD
- A factory method to create a new AbstractArray.
It may be invoked with or without a given array.
Each implementation of Array should have a field FACTORY_METHOD which
is a factory method that implements at least two variants of invoke()
- Object invoke(): returns new Array().
- Object invoke(Object[] array):
returns new Queue( array ).
get
public java.lang.Object get(int index)
- Returns the Object at position
index.
set
public void set(int index,
java.lang.Object object)
- Sets the Object at position
index
to object.
size
public int size()
- Returns the size of the Array.