|
ref_send API 1.16 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joe_e.array.ConstArray<E>
org.joe_e.array.ImmutableArray<E>
org.joe_e.array.PowerlessArray<E>
E - the element type of objects contained in the arraypublic class PowerlessArray<E>
An immutable array containing powerless objects.
| Nested Class Summary | |
|---|---|
static class |
PowerlessArray.Builder<E>
A PowerlessArray factory. |
| Method Summary | ||
|---|---|---|
static
|
array(E... values)
Constuct a PowerlessArray. |
|
static
|
builder()
Get a PowerlessArray.Builder. |
|
static
|
builder(int estimate)
Get a PowerlessArray.Builder. |
|
PowerlessArray<E> |
with(E newE)
Return a new PowerlessArray that contains the same elements
as this one but with a new element added to the end. |
|
PowerlessArray<E> |
without(int i)
Return a new PowerlessArray that contains the same elements
as this one excluding the element at a specified index |
|
| Methods inherited from class org.joe_e.array.ConstArray |
|---|
array, equals, get, hashCode, iterator, length, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <E> PowerlessArray<E> array(E... values)
PowerlessArray. The type will be
values - each value, or an array of values
java.lang.ClassCastException - if the runtime component type of
values is not powerless in the overlay type systempublic PowerlessArray<E> with(E newE)
PowerlessArray that contains the same elements
as this one but with a new element added to the end.
with in class ImmutableArray<E>newE - an element to add
java.lang.ClassCastException - if newE is not powerlesspublic PowerlessArray<E> without(int i)
PowerlessArray that contains the same elements
as this one excluding the element at a specified index
without in class ImmutableArray<E>i - the index of the element to exclude
public static <E> PowerlessArray.Builder<E> builder()
PowerlessArray.Builder. This is equivalent to the
constructor.
public static <E> PowerlessArray.Builder<E> builder(int estimate)
PowerlessArray.Builder. This is equivalent to the
constructor.
estimate - estimated array length
|
ref_send API 1.16 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 1998-2007 Waterken Inc. under the terms of the MIT X license.