|
||||||||||
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
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.
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
boolean |
add(boolean k)
|
void |
add(int i,
boolean k)
|
boolean |
addAll(BooleanCollection c)
Delegates to a more generic method. |
boolean |
addAll(BooleanList c)
Delegates to a more generic method. |
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
BooleanCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
BooleanList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
List c)
|
boolean |
addAll(List c)
|
BooleanListIterator |
booleanListIterator()
Delegates to the corresponding list-iterator method. |
BooleanListIterator |
booleanListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
BooleanList |
booleanSubList(int from,
int to)
|
void |
clear()
|
Object |
clone()
|
boolean |
contains(boolean k)
|
boolean |
getBoolean(int i)
|
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(BooleanCollection c)
Remove from this collection all elements in the given type-specific collection. |
boolean |
removeAll(Collection c)
Remove from this collection all elements in the given collection. |
boolean |
removeBoolean(int i)
|
boolean |
retainAll(BooleanCollection c)
Retains in this collection only elements from the given type-specific collection. |
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. |
boolean[] |
toBooleanArray()
Returns a primitive type array containing the items of this collection. |
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanList |
add, addElements, addElements, booleanIterator, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekBoolean, pop, popBoolean, push, push, remove, removeElements, set, set, subList, top, topBoolean, toString |
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, 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, iterator, remove, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection |
containsAll, toArray, toBooleanArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Field Detail |
public static final long serialVersionUID
Method Detail |
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
public boolean add(boolean k)
add
in interface BooleanCollection
add
in class AbstractBooleanCollection
public void add(int i, boolean k)
add
in interface BooleanList
add
in class AbstractBooleanList
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
public boolean contains(boolean k)
contains
in interface BooleanCollection
contains
in class AbstractBooleanList
public boolean addAll(BooleanList c)
AbstractBooleanList
addAll
in interface BooleanList
addAll
in class AbstractBooleanList
public boolean addAll(BooleanCollection c)
AbstractBooleanList
addAll
in interface BooleanCollection
addAll
in class AbstractBooleanList
public boolean addAll(int i, BooleanList c)
AbstractBooleanList
addAll
in interface BooleanList
addAll
in class AbstractBooleanList
public boolean addAll(int i, BooleanCollection c)
AbstractBooleanList
addAll
in interface BooleanList
addAll
in class AbstractBooleanList
public boolean removeAll(BooleanCollection c)
AbstractBooleanCollection
removeAll
in interface BooleanCollection
removeAll
in class AbstractBooleanCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean retainAll(BooleanCollection c)
AbstractBooleanCollection
retainAll
in interface BooleanCollection
retainAll
in class AbstractBooleanCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean addAll(List c)
public boolean addAll(Collection c)
AbstractBooleanList
addAll
in interface List
addAll
in class AbstractBooleanList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractBooleanList
public boolean removeAll(Collection c)
AbstractBooleanCollection
removeAll
in interface List
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 List
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
public BooleanListIterator booleanListIterator()
AbstractBooleanList
booleanListIterator
in interface BooleanList
booleanListIterator
in class AbstractBooleanList
public BooleanListIterator booleanListIterator(int i)
BooleanList
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
booleanListIterator
in interface BooleanList
List.listIterator(int)
public BooleanList booleanSubList(int from, int to)
booleanSubList
in interface BooleanList
booleanSubList
in class AbstractBooleanList
public int size()
size
in interface List
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
public void clear()
clear
in interface List
clear
in class AbstractBooleanCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |