public static class BooleanLists.Singleton extends AbstractBooleanList implements Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
AbstractBooleanList.BooleanSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(BooleanCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(Collection<? extends Boolean> c)
Delegates to a more generic method.
|
boolean |
addAll(int i,
BooleanCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int i,
Collection<? extends Boolean> c) |
void |
clear() |
Object |
clone() |
boolean |
contains(boolean k) |
boolean |
getBoolean(int i) |
BooleanListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
BooleanListIterator |
listIterator()
Returns a type-specific list iterator on the list.
|
BooleanListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(boolean k)
|
boolean |
removeAll(Collection<?> c)
Remove from this collection all elements in the given collection.
|
boolean |
removeBoolean(int i) |
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
int |
size() |
void |
size(int size)
Sets the size of this list.
|
BooleanList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
boolean[] |
toBooleanArray()
Returns a primitive type array containing the items of this collection.
|
add, add, add, addAll, addAll, addElements, addElements, booleanListIterator, booleanListIterator, booleanSubList, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, remove, remove, removeElements, set, set, top, topBoolean, toStringadd, booleanIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, retainAll, toArray, toArray, toArray, toBooleanArrayadd, contains, containsAll, isEmpty, replaceAll, sort, spliterator, toArray, toArraybooleanIterator, containsAll, removeAll, retainAll, toArray, toArray, toBooleanArrayparallelStream, removeIf, streampublic boolean getBoolean(int i)
getBoolean in interface BooleanListList.get(int)public boolean removeBoolean(int i)
removeBoolean in interface BooleanListremoveBoolean in class AbstractBooleanListList.remove(int)public boolean contains(boolean k)
contains in interface BooleanCollectioncontains in class AbstractBooleanListCollection.contains(Object)public boolean addAll(Collection<? extends Boolean> c)
AbstractBooleanListaddAll in interface Collection<Boolean>addAll in interface List<Boolean>addAll in class AbstractBooleanListc - a collection.true if this collection changed as a result of the call.public boolean addAll(int i,
Collection<? extends Boolean> c)
addAll in interface List<Boolean>addAll in class AbstractBooleanListpublic boolean removeAll(Collection<?> c)
AbstractBooleanCollectionremoveAll in interface Collection<Boolean>removeAll in interface List<Boolean>removeAll in class AbstractBooleanCollectionc - a collection.true if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractBooleanCollectionretainAll in interface Collection<Boolean>retainAll in interface List<Boolean>retainAll in class AbstractBooleanCollectionc - a collection.true if this collection changed as a result of the call.public boolean[] toBooleanArray()
BooleanCollectiontoBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectionCollection.toArray()public BooleanListIterator listIterator()
BooleanListlistIterator in interface BooleanListlistIterator in interface List<Boolean>listIterator in class AbstractBooleanListList.listIterator()public BooleanListIterator iterator()
BooleanCollectionNote that this specification strengthens the one given in Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by
the fact that this interface extends Collection.
iterator in interface BooleanCollectioniterator in interface BooleanIterableiterator in interface BooleanListiterator in interface Iterable<Boolean>iterator in interface Collection<Boolean>iterator in interface List<Boolean>iterator in class AbstractBooleanListpublic BooleanListIterator listIterator(int i)
BooleanListlistIterator in interface BooleanListlistIterator in interface List<Boolean>listIterator in class AbstractBooleanListList.listIterator(int)public BooleanList subList(int from, int to)
BooleanListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface BooleanListsubList in interface List<Boolean>subList in class AbstractBooleanListList.subList(int,int)public int size()
size in interface Collection<Boolean>size in interface List<Boolean>size in class AbstractCollection<Boolean>public void size(int size)
BooleanListIf the specified size is smaller than the current size, the last elements are discarded. Otherwise, they are filled with 0/null/false.
size in interface BooleanListsize in class AbstractBooleanListsize - the new size.public void clear()
clear in interface Collection<Boolean>clear in interface List<Boolean>clear in class AbstractCollection<Boolean>public boolean rem(boolean k)
BooleanCollectionremove(), but the clash with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().rem in interface BooleanCollectionrem in class AbstractBooleanListCollection.remove(Object)public boolean addAll(BooleanCollection c)
AbstractBooleanCollectionaddAll in interface BooleanCollectionaddAll in class AbstractBooleanListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(int i,
BooleanCollection c)
AbstractBooleanListaddAll in interface BooleanListaddAll in class AbstractBooleanListList.add(int,Object)