it.unimi.dsi.fastutil.objects
Class AbstractReferenceList.ReferenceSubList

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractReferenceCollection
      extended byit.unimi.dsi.fastutil.objects.AbstractReferenceList
          extended byit.unimi.dsi.fastutil.objects.AbstractReferenceList.ReferenceSubList
All Implemented Interfaces:
Collection, List, ReferenceCollection, ReferenceList, Serializable, Stack
Enclosing class:
AbstractReferenceList

public static class AbstractReferenceList.ReferenceSubList
extends AbstractReferenceList
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceList
AbstractReferenceList.ReferenceSubList
 
Constructor Summary
AbstractReferenceList.ReferenceSubList(ReferenceList 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, ReferenceCollection c)
          Delegates to a more generic method.
 boolean addAll(int index, ReferenceList 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.
 ReferenceList referenceSubList(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.AbstractReferenceList
addAll, addAll, addAll, addElements, 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.AbstractReferenceCollection
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

AbstractReferenceList.ReferenceSubList

public AbstractReferenceList.ReferenceSubList(ReferenceList l,
                                              int from,
                                              int to)
Method Detail

add

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

add

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

addAll

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

addAll

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

Overrides:
addAll in class AbstractReferenceList

addAll

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

Overrides:
addAll in class AbstractReferenceList

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 AbstractReferenceList

rem

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

set

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

clear

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

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: AbstractReferenceList
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 ReferenceList
Overrides:
getElements in class AbstractReferenceList
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: AbstractReferenceList
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 ReferenceList
Overrides:
removeElements in class AbstractReferenceList
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: AbstractReferenceList
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 ReferenceList
Overrides:
addElements in class AbstractReferenceList
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: ReferenceList
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 ReferenceList
Overrides:
objectListIterator in class AbstractReferenceList

referenceSubList

public ReferenceList referenceSubList(int from,
                                      int to)
Specified by:
referenceSubList in interface ReferenceList
Overrides:
referenceSubList in class AbstractReferenceList