it.unimi.dsi.fastutil.booleans
Class AbstractBooleanList.BooleanSubList

java.lang.Object
  extended byit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
      extended byit.unimi.dsi.fastutil.booleans.AbstractBooleanList
          extended byit.unimi.dsi.fastutil.booleans.AbstractBooleanList.BooleanSubList
All Implemented Interfaces:
BooleanCollection, BooleanList, BooleanStack, Collection, Comparable, List, Serializable, Stack
Enclosing class:
AbstractBooleanList

public static class AbstractBooleanList.BooleanSubList
extends AbstractBooleanList
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanList
AbstractBooleanList.BooleanSubList
 
Constructor Summary
AbstractBooleanList.BooleanSubList(BooleanList l, int from, int to)
           
 
Method Summary
 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 c)
           
 void addElements(int index, boolean[] a, int offset, int length)
          Adds elements to this type-specific list one-by-one.
 BooleanListIterator booleanListIterator(int index)
          Returns a type-specific list iterator on the list starting at a given index.
 BooleanList booleanSubList(int from, int to)
           
 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.
 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 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()
           
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanList
add, addAll, addAll, addAll, addElements, booleanIterator, booleanListIterator, compareTo, contains, equals, get, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekBoolean, pop, popBoolean, push, push, remove, set, size, subList, top, topBoolean, toString
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toBooleanArray, 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, removeAll, retainAll, toArray, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
containsAll, removeAll, retainAll, toArray, toBooleanArray, toBooleanArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Constructor Detail

AbstractBooleanList.BooleanSubList

public AbstractBooleanList.BooleanSubList(BooleanList l,
                                          int from,
                                          int to)
Method Detail

add

public boolean add(boolean k)
Specified by:
add in interface BooleanCollection
Overrides:
add in class AbstractBooleanList

add

public void add(int index,
                boolean k)
Specified by:
add in interface BooleanList
Overrides:
add in class AbstractBooleanList

addAll

public boolean addAll(int index,
                      Collection c)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractBooleanList

addAll

public boolean addAll(int index,
                      BooleanCollection c)
Description copied from class: AbstractBooleanList
Delegates to a more generic method.

Specified by:
addAll in interface BooleanList
Overrides:
addAll in class AbstractBooleanList

addAll

public boolean addAll(int index,
                      BooleanList l)
Description copied from class: AbstractBooleanList
Delegates to a more generic method.

Specified by:
addAll in interface BooleanList
Overrides:
addAll in class AbstractBooleanList

getBoolean

public boolean getBoolean(int index)
Specified by:
getBoolean in interface BooleanList
See Also:
List.get(int)

removeBoolean

public boolean removeBoolean(int index)
Specified by:
removeBoolean in interface BooleanList
Overrides:
removeBoolean in class AbstractBooleanList

rem

public boolean rem(boolean k)
Description copied from interface: BooleanCollection
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. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface BooleanCollection
Overrides:
rem in class AbstractBooleanList

set

public boolean set(int index,
                   boolean k)
Specified by:
set in interface BooleanList
Overrides:
set in class AbstractBooleanList

clear

public void clear()
Specified by:
clear in interface List
Overrides:
clear in class AbstractBooleanCollection

size

public int size()
Specified by:
size in interface List

getElements

public void getElements(int from,
                        boolean[] a,
                        int offset,
                        int length)
Description copied from class: AbstractBooleanList
Copies element of this type-specific list into the given array one-by-one.

This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

Specified by:
getElements in interface BooleanList
Overrides:
getElements in class AbstractBooleanList
Parameters:
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.

removeElements

public void removeElements(int from,
                           int to)
Description copied from class: AbstractBooleanList
Removes elements of this type-specific list one-by-one.

This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

Specified by:
removeElements in interface BooleanList
Overrides:
removeElements in class AbstractBooleanList
Parameters:
from - the start index (inclusive).
to - the end index (exclusive).

addElements

public void addElements(int index,
                        boolean[] a,
                        int offset,
                        int length)
Description copied from class: AbstractBooleanList
Adds elements to this type-specific list one-by-one.

This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

Specified by:
addElements in interface BooleanList
Overrides:
addElements in class AbstractBooleanList
Parameters:
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.

booleanListIterator

public BooleanListIterator booleanListIterator(int index)
Description copied from interface: BooleanList
Returns a type-specific list iterator on the list starting at a given 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.

Specified by:
booleanListIterator in interface BooleanList
Overrides:
booleanListIterator in class AbstractBooleanList

booleanSubList

public BooleanList booleanSubList(int from,
                                  int to)
Specified by:
booleanSubList in interface BooleanList
Overrides:
booleanSubList in class AbstractBooleanList