|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfreerails.util.GrowableBase
jfreerails.util.ArrayBase
jfreerails.util.IntArray
public class IntArray
Growable int array with type specific access methods. This
implementation is unsynchronized in order to provide the best possible
performance for typical usage scenarios, so explicit synchronization must be
implemented by a wrapper class or directly by the application in cases where
instances are modified in a multithreaded environment. See the base classes
for other details of the implementation.
| Field Summary | |
|---|---|
protected int[] |
baseArray
The underlying array used for storing the data. |
private static long |
serialVersionUID
|
| Fields inherited from class jfreerails.util.ArrayBase |
|---|
countPresent |
| Fields inherited from class jfreerails.util.GrowableBase |
|---|
countLimit, DEFAULT_SIZE, maximumGrowth |
| Constructor Summary | |
|---|---|
IntArray()
Default constructor. |
|
IntArray(int size)
Constructor with only initial size specified. |
|
IntArray(IntArray base)
Copy (clone) constructor. |
|
IntArray(int size,
int growth)
Constructor with full specification. |
|
| Method Summary | |
|---|---|
int |
add(int value)
Add a value to the array, appending it after the current values. |
void |
add(int index,
int value)
Add a value at a specified index in the array. |
java.lang.Object |
clone()
Duplicates the object with the generic call. |
int |
get(int index)
Retrieve the value present at an index position in the array. |
protected java.lang.Object |
getArray()
Get the backing array. |
void |
set(int index,
int value)
Set the value at an index position in the array. |
protected void |
setArray(java.lang.Object array)
Set the backing array. |
int[] |
toArray()
Constructs and returns a simple array containing the same data as held in this growable array. |
int[] |
toArray(int offset,
int length)
Constructs and returns a simple array containing the same data as held in a portion of this growable array. |
| Methods inherited from class jfreerails.util.ArrayBase |
|---|
buildArray, clear, getAddIndex, getArray, makeInsertSpace, remove, remove, setSize, size |
| Methods inherited from class jfreerails.util.GrowableBase |
|---|
discardValues, ensureCapacity, growArray, resizeCopy |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
protected int[] baseArray
| Constructor Detail |
|---|
public IntArray(int size,
int growth)
size - number of int values initially allowed in arraygrowth - maximum size increment for growing arraypublic IntArray(int size)
size - number of int values initially allowed in arraypublic IntArray()
public IntArray(IntArray base)
base - instance being copied| Method Detail |
|---|
protected final java.lang.Object getArray()
getArray in class GrowableBaseprotected final void setArray(java.lang.Object array)
setArray in class GrowableBasepublic final int add(int value)
value - value to be added
public void add(int index,
int value)
index - index position at which to insert elementvalue - value to be inserted into arraypublic final int get(int index)
index - index position for value to be retrieved
public final void set(int index,
int value)
index - index position to be setvalue - value to be setpublic int[] toArray()
public int[] toArray(int offset,
int length)
offset - start offset in arraylength - number of characters to use
public java.lang.Object clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||