it.unimi.dsi.fastutil.objects
Class AbstractObjectList.ObjectSubList

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractObjectCollection
      extended byit.unimi.dsi.fastutil.objects.AbstractObjectList
          extended byit.unimi.dsi.fastutil.objects.AbstractObjectList.ObjectSubList
All Implemented Interfaces:
Collection, Comparable, List, ObjectCollection, ObjectList, Serializable, Stack
Enclosing class:
AbstractObjectList

public static class AbstractObjectList.ObjectSubList
extends AbstractObjectList
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList
AbstractObjectList.ObjectSubList
 
Constructor Summary
AbstractObjectList.ObjectSubList(ObjectList l, int from, int to)
           
 
Method Summary
 void add(int index, Object k)
           
 boolean add(Object k)
           
 boolean addAll(int index, Collection c)
           
 boolean addAll(int index, ObjectCollection c)
          Delegates to a more generic method.
 boolean addAll(int index, ObjectList l)
          Delegates to a more generic method.
 void addElements(int index, Object[] a, int offset, int length)
          Adds elements to this type-specific list one-by-one.
 void clear()
           
 Object get(int index)
           
 void getElements(int from, Object[] a, int offset, int length)
          Copies element of this type-specific list into the given array one-by-one.
 ObjectListIterator objectListIterator(int index)
          Returns a type-specific list iterator on the list starting at a given index.
 ObjectList objectSubList(int from, int to)
           
 boolean rem(Object k)
           
 Object remove(int index)
           
 void removeElements(int from, int to)
          Removes elements of this type-specific list one-by-one.
 Object set(int index, Object k)
           
 int size()
           
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList
addAll, addAll, addAll, addElements, compareTo, contains, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, objectIterator, objectListIterator, peek, pop, push, size, subList, top, toString
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection
containsAll, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Constructor Detail

AbstractObjectList.ObjectSubList

public AbstractObjectList.ObjectSubList(ObjectList l,
                                        int from,
                                        int to)
Method Detail

add

public boolean add(Object k)
Specified by:
add in interface List
Overrides:
add in class AbstractObjectList

add

public void add(int index,
                Object k)
Specified by:
add in interface List
Overrides:
add in class AbstractObjectList

addAll

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

addAll

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

Overrides:
addAll in class AbstractObjectList

addAll

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

Overrides:
addAll in class AbstractObjectList

get

public Object get(int index)
Specified by:
get in interface List

remove

public Object remove(int index)
Specified by:
remove in interface List
Overrides:
remove in class AbstractObjectList

rem

public boolean rem(Object k)
Overrides:
rem in class AbstractObjectList

set

public Object set(int index,
                  Object k)
Specified by:
set in interface List
Overrides:
set in class AbstractObjectList

clear

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

size

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

getElements

public void getElements(int from,
                        Object[] a,
                        int offset,
                        int length)
Description copied from class: AbstractObjectList
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 ObjectList
Overrides:
getElements in class AbstractObjectList
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: AbstractObjectList
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 ObjectList
Overrides:
removeElements in class AbstractObjectList
Parameters:
from - the start index (inclusive).
to - the end index (exclusive).

addElements

public void addElements(int index,
                        Object[] a,
                        int offset,
                        int length)
Description copied from class: AbstractObjectList
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 ObjectList
Overrides:
addElements in class AbstractObjectList
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.

objectListIterator

public ObjectListIterator objectListIterator(int index)
Description copied from interface: ObjectList
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:
objectListIterator in interface ObjectList
Overrides:
objectListIterator in class AbstractObjectList

objectSubList

public ObjectList objectSubList(int from,
                                int to)
Specified by:
objectSubList in interface ObjectList
Overrides:
objectSubList in class AbstractObjectList