|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.util.IntArrayList
This is a convenience class used to create an
ArrayList
of integers.
Constructor Summary | |
IntArrayList()
Constructor. |
|
IntArrayList(int initialCapacity)
Constructor. |
Method Summary | |
void |
add(int value)
This method appends an element to the list. |
void |
ensureCapacity(int minCapacity)
This method ensures that the list is large enough for minCapacity elements. |
void |
ensureCapacityAndFill(int minCapacity,
int fillValue)
This method ensures that the list is large enough for minCapacity elements. |
int |
get(int index)
This method gets the integer value stored in element index. |
void |
set(int index,
int value)
This method sets an element of the list to the input integer value. |
int |
size()
This method gets the size of the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IntArrayList()
public IntArrayList(int initialCapacity)
initialCapacity
- Initial capacity of the list.Method Detail |
public void add(int value)
value
- The integer value that we assign to the
element that we are appending to the list.public void ensureCapacity(int minCapacity)
minCapacity
elements.minCapacity
- The minimum capacity of the list.public void ensureCapacityAndFill(int minCapacity, int fillValue)
minCapacity
elements. It also fills in the
new slots in the list with the integer value input as
fillValue
.minCapacity
- The minimum capacity of the list.fillValue
- This method adds in a integer for each
slot that was added to ensure that the
list meets the minimum capacity.
fillValue
is the value
used as the initial value of these
added elements.public int get(int index)
index
- The index in the list of the element
we wish to get the value from.public void set(int index, int value)
index
- The index in the list of the element
we wish to set.value
- The integer value that we assign to the
selected element of the list.public int size()
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |