public static class AbstractBooleanList.BooleanSubList extends AbstractBooleanList implements Serializable
AbstractBooleanList.BooleanSubList| Constructor and Description |
|---|
BooleanSubList(BooleanList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(boolean k)
Ensures that this collection contains the specified element (optional
operation).
|
void |
add(int index,
boolean k)
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(int index,
BooleanCollection c)
Inserts all of the elements in the specified type-specific collection
into this type-specific list at the specified position (optional
operation).
|
boolean |
addAll(int index,
BooleanList l)
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
boolean |
addAll(int index,
Collection<? extends Boolean> c)
Adds all of the elements in the specified collection to this list
(optional operation).
|
void |
addElements(int index,
boolean[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
boolean |
getBoolean(int index)
Returns the element at the specified position in this list.
|
void |
getElements(int from,
boolean[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the
given array.
|
BooleanListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given
index.
|
boolean |
rem(boolean k)
Removes a single instance of the specified element from this collection,
if it is present (optional operation).
|
boolean |
removeBoolean(int index)
Removes the element at the specified position in this list (optional
operation).
|
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
boolean |
set(int index,
boolean k)
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
int |
size()
Returns the number of elements in this collection.
|
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, clear, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekBoolean, pop, popBoolean, push, push, remove, set, size, top, topBoolean, toStringadd, contains, containsAll, remove, removeAll, retainAll, toArray, toBooleanArray, toBooleanArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArrayaddcontains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraycontains, containsAll, remove, removeAll, retainAll, toArray, toBooleanArray, toBooleanArrayparallelStream, removeIf, streamforEach, forEachpublic BooleanSubList(BooleanList l, int from, int to)
public boolean add(boolean k)
AbstractBooleanList
This implementation always throws an
UnsupportedOperationException.
This implementation delegates to the type-specific version of
List.add(int, Object).
add in interface BooleanCollectionadd in interface BooleanListadd in class AbstractBooleanListCollection.add(Object)public void add(int index,
boolean k)
AbstractBooleanList
This implementation always throws an
UnsupportedOperationException.
add in interface BooleanListadd in class AbstractBooleanListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Boolean> c)
AbstractBooleanListaddAll in interface List<Boolean>addAll in class AbstractBooleanListindex - index at which to insert the first element from the
specified collectionc - collection containing elements to be added to this listpublic boolean getBoolean(int index)
BooleanListgetBoolean in interface BooleanListList.get(int)public boolean removeBoolean(int index)
AbstractBooleanList
This implementation always throws an
UnsupportedOperationException.
removeBoolean in interface BooleanListremoveBoolean in class AbstractBooleanListList.remove(int)public boolean set(int index,
boolean k)
AbstractBooleanList
This implementation always throws an
UnsupportedOperationException.
set in interface BooleanListset in class AbstractBooleanListList.set(int,Object)public int size()
java.util.Collectionsize 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)
AbstractBooleanListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface BooleanListgetElements in class AbstractBooleanListfrom - 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)
AbstractBooleanListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface BooleanListremoveElements in class AbstractBooleanListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
boolean[] a,
int offset,
int length)
AbstractBooleanListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface BooleanListaddElements in class AbstractBooleanListindex - 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)
AbstractBooleanListThis implementation is based on the random-access methods.
listIterator in interface BooleanListlistIterator in interface List<Boolean>listIterator in class AbstractBooleanListindex - index of the first element to be returned from the
list iterator (by a call to next)List.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 AbstractBooleanListfrom - low endpoint (inclusive) of the subListto - high endpoint (exclusive) of the subListList.subList(int,int)public boolean rem(boolean k)
AbstractBooleanList
This implementation delegates to indexOf().
rem in interface BooleanCollectionrem in class AbstractBooleanListList.remove(Object)public boolean addAll(int index,
BooleanCollection c)
BooleanListaddAll in interface BooleanListaddAll in class AbstractBooleanListList.addAll(int,java.util.Collection)public boolean addAll(int index,
BooleanList l)
AbstractBooleanList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface BooleanListaddAll in class AbstractBooleanListList.add(int,Object)