|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmobileis.common.util.collection.IntArray
Title: OpenMobileIS project source
Description: Use to store an Array of int.
Field Summary | |
protected static long |
serialVersionUID
|
Constructor Summary | |
IntArray()
Constructs an empty list. |
|
IntArray(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
Method Summary | |
boolean |
add(int o)
Appends the specified element to the end of this list. |
boolean |
add(int[] array)
Appends the specified LongArray to the end of this list. |
boolean |
add(IntArray array)
Appends the specified LongArray to the end of this list. |
boolean |
add(int index,
int o)
Appends the specified element to the end of this list. |
void |
clear()
|
boolean |
contains(int o)
return true if the array contains the specified int false otherwise. |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument. |
int |
get(int index)
Returns the element at the specified position in this list. |
protected int[] |
getArrayElements()
|
boolean |
isEmpty()
Tests if this list has no elements. |
long |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
replace(int index,
int o)
replace at the specified index the element. |
protected void |
setArrayElements(int[] array)
|
int |
size()
Returns the number of elements in this list. |
int[] |
toArray()
Returns an array containing all of the elements in this list in the correct order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
Constructor Detail |
public IntArray(int initialCapacity)
initialCapacity
- the initial capacity of the list.
java.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic IntArray()
Method Detail |
public void clear()
protected int[] getArrayElements()
protected void setArrayElements(int[] array)
public void ensureCapacity(int minCapacity)
minCapacity
- the desired minimum capacity.public int size()
public boolean isEmpty()
public boolean contains(int o)
public int[] toArray()
public int get(int index)
index
- index of element to return.
java.lang.IndexOutOfBoundsException
- if index is out of range (index
< 0 || index >= size()).public boolean add(int o)
o
- element to be appended to this list.
public boolean add(IntArray array)
array
- long to add.
public boolean replace(int index, int o)
index
- index in the array where element is replaced.o
- element to be replaced to this ArrayList.
public boolean add(int[] array)
array
- long to add.
public boolean add(int index, int o)
o
- element to be appended to this list.
public long remove(int index)
index
- the index of the element to removed.
java.lang.IndexOutOfBoundsException
- if index out of range (index
< 0 || index >= size()).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |