|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.ImmutableArray<V>
V - value classpublic class ImmutableArray<V>
The ImmutableArray gives the functionality of immutable arrays.
| Constructor Summary | |
|---|---|
ImmutableArray(V... pArray)
Constructs a new Array. |
|
| Method Summary | |
|---|---|
ImmutableArray<V> |
add(ImmutableArray<V> pImmutableArray)
Adds the given ImmutableArray to this ImmutableArray. |
ImmutableArray<V> |
add(int pIndex,
ImmutableArray<V> pImmutableArray)
Adds the given ImmutableArray to this ImmutableArray at the given index. |
ImmutableArray<V> |
add(int pIndex,
V... pArray)
Adds the given array to this ImmutableArray at the given index. |
ImmutableArray<V> |
add(V... pArray)
Adds the given array to this ImmutableArray. |
boolean |
contains(V pValue)
Gets true, if the array contains the given value. |
boolean |
equals(java.lang.Object pObject)
|
V |
get(int pIndex)
Gets the value of given index. |
int |
hashCode()
|
int |
indexOf(V pValue)
Gets the index of the given value. |
ImmutableArray<V> |
remove(ImmutableArray<V> pImmutableArray)
Removes the given ImmutableArray to this ImmutableArray. |
ImmutableArray<V> |
remove(int pIndex)
Removes one element at the given index. |
ImmutableArray<V> |
remove(int pIndex,
int pAmount)
Removes the given amount of elements at the given index. |
ImmutableArray<V> |
remove(V... pArray)
Removes the given array to this ImmutableArray. |
ImmutableArray<V> |
removeAll()
Removes all elements. |
ImmutableArray<V> |
removeFirst()
Removes the first element. |
ImmutableArray<V> |
removeFirst(int pAmount)
Removes the given amount at the beginning. |
ImmutableArray<V> |
removeLast()
Removes the last element. |
ImmutableArray<V> |
removeLast(int pAmount)
Removes the given amount at the end. |
ImmutableArray<V> |
set(int pIndex,
V pValue)
Sets the value of a given index. |
int |
size()
Gets the length of the array. |
V[] |
toArray()
Gets a mutable array of this immutable array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableArray(V... pArray)
pArray - the array.| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object pObject)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int size()
public V get(int pIndex)
pIndex - the index.
public ImmutableArray<V> set(int pIndex,
V pValue)
pIndex - the index.pValue - the value.
public ImmutableArray<V> add(ImmutableArray<V> pImmutableArray)
ImmutableArray to this ImmutableArray.
pImmutableArray - the ImmutableArray.
public ImmutableArray<V> add(V... pArray)
ImmutableArray.
pArray - the array.
public ImmutableArray<V> add(int pIndex,
ImmutableArray<V> pImmutableArray)
ImmutableArray to this ImmutableArray at the given index.
pIndex - the index.pImmutableArray - the ImmutableArray.
public ImmutableArray<V> add(int pIndex,
V... pArray)
ImmutableArray at the given index.
pIndex - the index.pArray - the array.
public int indexOf(V pValue)
pValue - the value.
public boolean contains(V pValue)
pValue - the value.
public ImmutableArray<V> remove(ImmutableArray<V> pImmutableArray)
ImmutableArray to this ImmutableArray.
pImmutableArray - the ImmutableArray.
public ImmutableArray<V> remove(V... pArray)
ImmutableArray.
pArray - the array.
public ImmutableArray<V> remove(int pIndex)
pIndex - the index.
public ImmutableArray<V> removeAll()
public ImmutableArray<V> removeFirst()
public ImmutableArray<V> removeFirst(int pAmount)
pAmount - the amount.
public ImmutableArray<V> removeLast()
public ImmutableArray<V> removeLast(int pAmount)
pAmount - the amount.
public ImmutableArray<V> remove(int pIndex,
int pAmount)
pIndex - the index.pAmount - the amount.
public V[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||