|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.joe_e.array.ConstArray.Builder<E>
org.joe_e.array.ImmutableArray.Builder<E>
org.joe_e.array.PowerlessArray.Builder<Integer>
org.joe_e.array.IntArray.Builder
public static final class IntArray.Builder
A IntArray factory.
| Method Summary | |
|---|---|
void |
append(int newInt)
Append a int |
void |
append(int[] newInts)
Append an array of ints |
void |
append(int[] newInts,
int off,
int len)
Append a range of elements from an array of ints |
void |
append(Integer newInt)
Append a Integer |
void |
append(Integer[] newInts)
Append an array of Integers |
void |
append(Integer[] newInts,
int off,
int len)
Append a range of elements from an array of Integers |
IntArray |
snapshot()
Create a snapshot of the current content. |
| Methods inherited from class org.joe_e.array.ConstArray.Builder |
|---|
length |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void append(Integer newInt)
Integer
append in interface ArrayBuilder<Integer>append in class PowerlessArray.Builder<Integer>newInt - the element to add
NegativeArraySizeException - if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.public void append(Integer[] newInts)
Integers
append in interface ArrayBuilder<Integer>append in class PowerlessArray.Builder<Integer>newInts - the elements to add
IndexOutOfBoundsException - if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.
public void append(Integer[] newInts,
int off,
int len)
Integers
append in interface ArrayBuilder<Integer>append in class PowerlessArray.Builder<Integer>newInts - the array to add elements fromoff - the index of the first element to addlen - the number of elements to add
IndexOutOfBoundsException - if an out-of-bounds index would
be referenced or the resulting internal array would exceed the
maximum length of a Java array. The builder is unmodified.public IntArray snapshot()
snapshot in interface ArrayBuilder<Integer>snapshot in class PowerlessArray.Builder<Integer>IntArray containing the elements so farpublic void append(int newInt)
int
newInt - the element to add
NegativeArraySizeException - if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.public void append(int[] newInts)
ints
newInts - the elements to add
IndexOutOfBoundsException - if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.
public void append(int[] newInts,
int off,
int len)
ints
newInts - the array to add elements fromoff - the index of the first element to addlen - the number of elements to add
IndexOutOfBoundsException - if an out-of-bounds index would
be referenced or the resulting internal array would exceed the
maximum length of a Java array. The builder is unmodified.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||