|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
it.unimi.dsi.fastutil.booleans.AbstractBooleanList
it.unimi.dsi.fastutil.booleans.BooleanLists.Singleton
public static class BooleanLists.Singleton
An immutable class representing a type-specific singleton list.
This class may be useful to implement your own in case you subclass a type-specific list.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanList |
|---|
AbstractBooleanList.BooleanSubList |
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Method Summary | |
|---|---|
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 |
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)
Note that this method should be called remove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
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. |
| Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanList |
|---|
add, add, add, addAll, addAll, addElements, addElements, booleanListIterator, booleanListIterator, booleanSubList, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, remove, remove, removeElements, set, set, top, topBoolean, toString |
| Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection |
|---|
add, booleanIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, retainAll, toArray, toArray, toArray, toBooleanArray |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, contains, containsAll, isEmpty, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection |
|---|
booleanIterator, containsAll, removeAll, retainAll, toArray, toArray, toBooleanArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
|---|
isEmpty |
| Field Detail |
|---|
public static final long serialVersionUID
| Method Detail |
|---|
public 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)
AbstractBooleanList
addAll 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)
AbstractBooleanCollection
removeAll 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)
AbstractBooleanCollection
retainAll 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()
BooleanCollection
toBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectionCollection.toArray()public BooleanListIterator listIterator()
BooleanList
listIterator in interface BooleanListlistIterator in interface List<Boolean>listIterator in class AbstractBooleanListBooleanList.listIterator()public BooleanListIterator listIterator(int i)
BooleanList
listIterator in interface BooleanListlistIterator in interface List<Boolean>listIterator in class AbstractBooleanListBooleanList.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>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 AbstractBooleanCollectionpublic Object clone()
clone in class Objectpublic 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)
AbstractBooleanCollection
addAll 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)
AbstractBooleanList
addAll in interface BooleanListaddAll in class AbstractBooleanListList.add(int,Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||