|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<Boolean>
it.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 |
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)
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, 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 BooleanList
List.get(int)
public boolean removeBoolean(int i)
removeBoolean
in interface BooleanList
removeBoolean
in class AbstractBooleanList
List.remove(int)
public boolean contains(boolean k)
contains
in interface BooleanCollection
contains
in class AbstractBooleanList
Collection.contains(Object)
public boolean addAll(Collection<? extends Boolean> c)
AbstractBooleanList
addAll
in interface Collection<Boolean>
addAll
in interface List<Boolean>
addAll
in class AbstractBooleanList
c
- 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 AbstractBooleanList
public boolean removeAll(Collection<?> c)
AbstractBooleanCollection
removeAll
in interface Collection<Boolean>
removeAll
in interface List<Boolean>
removeAll
in class AbstractBooleanCollection
c
- 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 AbstractBooleanCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean[] toBooleanArray()
BooleanCollection
toBooleanArray
in interface BooleanCollection
toBooleanArray
in class AbstractBooleanCollection
Collection.toArray()
public BooleanListIterator listIterator()
BooleanList
listIterator
in interface BooleanList
listIterator
in interface List<Boolean>
listIterator
in class AbstractBooleanList
List.listIterator()
public BooleanListIterator iterator()
BooleanCollection
Note 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 BooleanCollection
iterator
in interface BooleanIterable
iterator
in interface BooleanList
iterator
in interface Iterable<Boolean>
iterator
in interface Collection<Boolean>
iterator
in interface List<Boolean>
iterator
in class AbstractBooleanList
public BooleanListIterator listIterator(int i)
BooleanList
listIterator
in interface BooleanList
listIterator
in interface List<Boolean>
listIterator
in class AbstractBooleanList
List.listIterator(int)
public BooleanList subList(int from, int to)
BooleanList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
subList
in interface BooleanList
subList
in interface List<Boolean>
subList
in class AbstractBooleanList
List.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)
BooleanList
If 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 BooleanList
size
in class AbstractBooleanList
size
- the new size.public void clear()
clear
in interface Collection<Boolean>
clear
in interface List<Boolean>
clear
in class AbstractCollection<Boolean>
public Object clone()
clone
in class Object
public boolean rem(boolean k)
BooleanCollection
remove()
, 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 BooleanCollection
rem
in class AbstractBooleanList
Collection.remove(Object)
public boolean addAll(BooleanCollection c)
AbstractBooleanCollection
addAll
in interface BooleanCollection
addAll
in class AbstractBooleanList
c
- 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 BooleanList
addAll
in class AbstractBooleanList
List.add(int,Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |