|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.DynamicArrayOfPosInt
Implements a dynamic array of positive integers.
Constructor Summary | |
DynamicArrayOfPosInt()
Constructor |
|
DynamicArrayOfPosInt(int size)
Constructor with size larger than 1. |
Method Summary | |
int |
deleteOneIndex(int value)
Deletes an entry. |
int |
get(int position)
|
int |
length()
|
void |
set(int position,
int value)
Stores the value in the specified position in the array. |
void |
squeezeIn(int position,
int value)
Sqeezes in the value in the specified position in the array. |
java.lang.String |
toString()
Build a string representing this array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DynamicArrayOfPosInt()
public DynamicArrayOfPosInt(int size)
size
- initial size of the arrayMethod Detail |
public int length()
public int get(int position)
public void set(int position, int value)
position
- position to write value tovalue
- value that is written to arraypublic int deleteOneIndex(int value)
value
- value that is to be deletedpublic void squeezeIn(int position, int value)
position
- position to write value tovalue
- value that is written to arraypublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |