public static class AbstractBooleanList.BooleanSubList extends AbstractBooleanList implements Serializable
AbstractBooleanList.BooleanSubList
Constructor and Description |
---|
AbstractBooleanList.BooleanSubList(BooleanList l,
int from,
int to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(boolean k) |
void |
add(int index,
boolean k) |
boolean |
addAll(int index,
BooleanCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
BooleanList l)
Delegates to a more generic method.
|
boolean |
addAll(int index,
Collection<? extends Boolean> c) |
void |
addElements(int index,
boolean[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
boolean |
getBoolean(int index) |
void |
getElements(int from,
boolean[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
BooleanListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(boolean k)
|
boolean |
remove(Object o)
Delegates to
rem() . |
boolean |
removeBoolean(int index) |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
boolean |
set(int index,
boolean k) |
int |
size() |
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. |
add, addAll, addAll, addAll, addElements, booleanListIterator, booleanListIterator, booleanSubList, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekBoolean, pop, popBoolean, push, push, remove, set, size, top, topBoolean, toString
add, booleanIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toBooleanArray, toBooleanArray
add, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
booleanIterator, containsAll, removeAll, retainAll, toArray, toArray, toBooleanArray, toBooleanArray
public AbstractBooleanList.BooleanSubList(BooleanList l, int from, int to)
public boolean add(boolean k)
add
in interface BooleanCollection
add
in interface BooleanList
add
in class AbstractBooleanList
Collection.add(Object)
public void add(int index, boolean k)
add
in interface BooleanList
add
in class AbstractBooleanList
List.add(int,Object)
public boolean addAll(int index, Collection<? extends Boolean> c)
addAll
in interface List<Boolean>
addAll
in class AbstractBooleanList
public boolean getBoolean(int index)
getBoolean
in interface BooleanList
List.get(int)
public boolean removeBoolean(int index)
removeBoolean
in interface BooleanList
removeBoolean
in class AbstractBooleanList
List.remove(int)
public boolean set(int index, boolean k)
set
in interface BooleanList
set
in class AbstractBooleanList
List.set(int,Object)
public void clear()
clear
in interface Collection<Boolean>
clear
in interface List<Boolean>
clear
in class AbstractCollection<Boolean>
public int size()
size
in interface Collection<Boolean>
size
in interface List<Boolean>
size
in class AbstractCollection<Boolean>
public void getElements(int from, boolean[] a, int offset, int length)
AbstractBooleanList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface BooleanList
getElements
in class AbstractBooleanList
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)
AbstractBooleanList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface BooleanList
removeElements
in class AbstractBooleanList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, boolean[] a, int offset, int length)
AbstractBooleanList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface BooleanList
addElements
in class AbstractBooleanList
index
- the index at which to add elements.a
- the array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.public BooleanListIterator listIterator(int index)
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 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 remove(Object o)
AbstractBooleanList
rem()
.remove
in interface Collection<Boolean>
remove
in interface List<Boolean>
remove
in class AbstractBooleanList
public boolean addAll(int index, BooleanCollection c)
AbstractBooleanList
addAll
in interface BooleanList
addAll
in class AbstractBooleanList
List.add(int,Object)
public boolean addAll(int index, BooleanList l)
AbstractBooleanList
addAll
in interface BooleanList
addAll
in class AbstractBooleanList
List.add(int,Object)