|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A type-specific List
; provides some additional methods that use polymorphism to reduce type juggling.
List
Method Summary | |
void |
add(int index,
boolean key)
|
boolean |
addAll(BooleanList c)
|
boolean |
addAll(int index,
BooleanCollection c)
|
boolean |
addAll(int index,
BooleanList c)
|
BooleanListIterator |
booleanListIterator()
Returns a type-specific list iterator on the list. |
BooleanListIterator |
booleanListIterator(int index)
Returns a type-specific list iterator on the list starting at a given index. |
BooleanList |
booleanSubList(int from,
int to)
|
boolean |
getBoolean(int index)
|
void |
getElements(int from,
boolean[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array. |
int |
indexOf(boolean k)
|
int |
lastIndexOf(boolean k)
|
boolean |
removeBoolean(int index)
|
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list. |
boolean |
set(int index,
boolean k)
|
void |
size(int size)
Sets the size of this list. |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection |
add, addAll, booleanIterator, contains, containsAll, remove, removeAll, retainAll, toArray, toBooleanArray, toBooleanArray |
Method Detail |
public BooleanListIterator booleanListIterator()
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
List.listIterator()
public BooleanListIterator booleanListIterator(int index)
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
List.listIterator(int)
public BooleanList booleanSubList(int from, int to)
List.subList(int,int)
public void size(int size)
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
size
- the new size.public void getElements(int from, boolean[] a, int offset, int length)
from
- the start index (inclusive).a
- the destination array.offset
- the offset into the destination array where to store the first element copied.length
- the number of elements to be copied.public void removeElements(int from, int to)
from
- the start index (inclusive).to
- the end index (exclusive).public void add(int index, boolean key)
List.add(int,Object)
public boolean addAll(int index, BooleanCollection c)
List.add(int,Object)
public boolean addAll(int index, BooleanList c)
List.add(int,Object)
public boolean addAll(BooleanList c)
List.add(int,Object)
public boolean getBoolean(int index)
List.get(int)
public int indexOf(boolean k)
List.indexOf(Object)
public int lastIndexOf(boolean k)
List.lastIndexOf(Object)
public boolean removeBoolean(int index)
List.remove(int)
public boolean set(int index, boolean k)
List.set(int,Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |