|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.primitives.collection.impl.AbstractPrimitiveCollectable<Boolean>
org.joda.primitives.collection.impl.AbstractBooleanCollection
org.joda.primitives.list.impl.AbstractBooleanList
org.joda.primitives.list.impl.ImmutableArrayBooleanList
public final class ImmutableArrayBooleanList
Immutable array-based implementation of BooleanList for
primitive int elements.
This class implements List allowing
seamless integration with other APIs.
Add, Remove, Set and Clear are not supported as this class is immutable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.joda.primitives.list.impl.AbstractBooleanList |
|---|
AbstractBooleanList.PListIterator |
| Method Summary | |
|---|---|
protected void |
arrayCopy(int fromIndex,
boolean[] dest,
int destIndex,
int size)
Copies data from this collection into the specified array. |
Object |
clone()
Clone implementation that returns this. |
boolean |
contains(boolean value)
Checks whether this collection contains a specified primitive value. |
static ImmutableArrayBooleanList |
copyOf(boolean[] values)
Creates a list copying the specified array. |
static ImmutableArrayBooleanList |
copyOf(Collection<Boolean> coll)
Creates a list copying the values from the specified collection. |
static ImmutableArrayBooleanList |
empty()
Gets a list that is empty. |
boolean |
getBoolean(int index)
Gets the primitive value at the specified index. |
int |
size()
Gets the current size of the collection. |
| Methods inherited from class org.joda.primitives.list.impl.AbstractBooleanList |
|---|
add, add, add, add, addAll, addAll, addAll, checkIndex, checkIndexExists, checkRange, checkSetModifiable, clear, equals, first, firstBoolean, get, hashCode, indexOf, indexOf, indexOf, indexOf, isModifiable, isSetModifiable, iterator, last, lastBoolean, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeBoolean, removeBooleanAt, removeRange, set, set, subList, toBooleanArray |
| Methods inherited from class org.joda.primitives.collection.impl.AbstractBooleanCollection |
|---|
addAll, addAll, checkAddModifiable, checkRemoveModifiable, contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAny, isAddModifiable, isRemoveModifiable, isToPrimitivePossible, remove, removeAll, removeAll, removeAll, removeAll, removeFirst, retainAll, retainAll, retainAll, toArray, toArray, toBooleanArray, toBooleanArray, toObject, toPrimitive, toPrimitiveArray, toString |
| Methods inherited from class org.joda.primitives.collection.impl.AbstractPrimitiveCollectable |
|---|
isEmpty, optimize |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.joda.primitives.collection.PrimitiveCollection |
|---|
containsAny |
| Methods inherited from interface org.joda.primitives.PrimitiveCollectable |
|---|
isEmpty, optimize |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface org.joda.primitives.collection.BooleanCollection |
|---|
addAll, containsAll, containsAll, containsAny, containsAny, removeAll, removeAll, removeAll, removeFirst, retainAll, retainAll, toBooleanArray, toBooleanArray |
| Methods inherited from interface org.joda.primitives.collection.PrimitiveCollection |
|---|
containsAny |
| Methods inherited from interface org.joda.primitives.PrimitiveCollectable |
|---|
isEmpty, optimize |
| Method Detail |
|---|
public static ImmutableArrayBooleanList empty()
public static ImmutableArrayBooleanList copyOf(boolean[] values)
values - an array of values to copy, null treated as zero size array
public static ImmutableArrayBooleanList copyOf(Collection<Boolean> coll)
If the collection is an instance of this class, then it is simply returned.
coll - a collection of values to copy, null treated as zero size collection
public int size()
public boolean getBoolean(int index)
index - the index to get from
IndexOutOfBoundsException - if the index is invalidpublic boolean contains(boolean value)
This implementation accesses the internal storage array directly.
contains in interface BooleanCollectioncontains in class AbstractBooleanListvalue - the value to search for
true if the value is foundpublic Object clone()
this.
clone in interface PrimitiveCollectable<Boolean>clone in class AbstractPrimitiveCollectable<Boolean>this
protected void arrayCopy(int fromIndex,
boolean[] dest,
int destIndex,
int size)
arrayCopy in class AbstractBooleanListfromIndex - the index to start fromdest - the destination arraydestIndex - the destination start indexsize - the number of items to copy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||