it.unimi.dsi.fastutil.floats
Class AbstractFloatList.FloatSubList

java.lang.Object
  extended by java.util.AbstractCollection<java.lang.Float>
      extended by it.unimi.dsi.fastutil.floats.AbstractFloatCollection
          extended by it.unimi.dsi.fastutil.floats.AbstractFloatList
              extended by it.unimi.dsi.fastutil.floats.AbstractFloatList.FloatSubList
All Implemented Interfaces:
FloatCollection, FloatIterable, FloatList, FloatStack, Stack<java.lang.Float>, java.io.Serializable, java.lang.Comparable<java.util.List<? extends java.lang.Float>>, java.lang.Iterable<java.lang.Float>, java.util.Collection<java.lang.Float>, java.util.List<java.lang.Float>
Enclosing class:
AbstractFloatList

public static class AbstractFloatList.FloatSubList
extends AbstractFloatList
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList
AbstractFloatList.FloatSubList
 
Constructor Summary
AbstractFloatList.FloatSubList(FloatList l, int from, int to)
           
 
Method Summary
 boolean add(float k)
           
 void add(int index, float k)
           
 boolean addAll(int index, java.util.Collection<? extends java.lang.Float> c)
           
 boolean addAll(int index, FloatCollection c)
          Delegates to a more generic method.
 boolean addAll(int index, FloatList l)
          Delegates to a more generic method.
 void addElements(int index, float[] a, int offset, int length)
          Adds elements to this type-specific list one-by-one.
 void clear()
           
 void getElements(int from, float[] a, int offset, int length)
          Copies element of this type-specific list into the given array one-by-one.
 float getFloat(int index)
           
 FloatListIterator listIterator(int index)
          Returns a type-specific list iterator on the list starting at a given index.
 boolean rem(float 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 remove(java.lang.Object o)
          Delegates to rem().
 void removeElements(int from, int to)
          Removes elements of this type-specific list one-by-one.
 float removeFloat(int index)
           
 float set(int index, float k)
           
 int size()
           
 FloatList 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.
 
Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList
add, addAll, addAll, addAll, addElements, compareTo, contains, equals, floatListIterator, floatListIterator, floatSubList, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekFloat, pop, popFloat, push, push, remove, set, size, top, topFloat, toString
 
Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatCollection
add, contains, containsAll, containsAll, floatIterator, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toFloatArray, toFloatArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
containsAll, floatIterator, removeAll, retainAll, toArray, toArray, toFloatArray, toFloatArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Constructor Detail

AbstractFloatList.FloatSubList

public AbstractFloatList.FloatSubList(FloatList l,
                                      int from,
                                      int to)
Method Detail

add

public boolean add(float k)
Specified by:
add in interface FloatCollection
Specified by:
add in interface FloatList
Overrides:
add in class AbstractFloatList
See Also:
Collection.add(Object)

add

public void add(int index,
                float k)
Specified by:
add in interface FloatList
Overrides:
add in class AbstractFloatList
See Also:
List.add(int,Object)

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends java.lang.Float> c)
Specified by:
addAll in interface java.util.List<java.lang.Float>
Overrides:
addAll in class AbstractFloatList

getFloat

public float getFloat(int index)
Specified by:
getFloat in interface FloatList
See Also:
List.get(int)

removeFloat

public float removeFloat(int index)
Specified by:
removeFloat in interface FloatList
Overrides:
removeFloat in class AbstractFloatList
See Also:
List.remove(int)

set

public float set(int index,
                 float k)
Specified by:
set in interface FloatList
Overrides:
set in class AbstractFloatList
See Also:
List.set(int,Object)

clear

public void clear()
Specified by:
clear in interface java.util.Collection<java.lang.Float>
Specified by:
clear in interface java.util.List<java.lang.Float>
Overrides:
clear in class java.util.AbstractCollection<java.lang.Float>

size

public int size()
Specified by:
size in interface java.util.Collection<java.lang.Float>
Specified by:
size in interface java.util.List<java.lang.Float>
Specified by:
size in class java.util.AbstractCollection<java.lang.Float>

getElements

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

addElements

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

listIterator

public FloatListIterator listIterator(int index)
Description copied from interface: FloatList
Returns a type-specific list iterator on the list starting at a given index.

Specified by:
listIterator in interface FloatList
Specified by:
listIterator in interface java.util.List<java.lang.Float>
Overrides:
listIterator in class AbstractFloatList
See Also:
List.listIterator(int)

subList

public FloatList subList(int from,
                         int to)
Description copied from interface: FloatList
Returns a type-specific view of the portion of this list from the index from, inclusive, to the index to, exclusive.

Note that this specification strengthens the one given in List.subList(int,int).

Specified by:
subList in interface FloatList
Specified by:
subList in interface java.util.List<java.lang.Float>
Overrides:
subList in class AbstractFloatList
See Also:
List.subList(int,int)

rem

public boolean rem(float k)
Description copied from interface: FloatCollection
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 FloatCollection
Overrides:
rem in class AbstractFloatList
See Also:
Collection.remove(Object)

remove

public boolean remove(java.lang.Object o)
Description copied from class: AbstractFloatList
Delegates to rem().

Specified by:
remove in interface java.util.Collection<java.lang.Float>
Specified by:
remove in interface java.util.List<java.lang.Float>
Overrides:
remove in class AbstractFloatList

addAll

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

Specified by:
addAll in interface FloatList
Overrides:
addAll in class AbstractFloatList
See Also:
List.add(int,Object)

addAll

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

Specified by:
addAll in interface FloatList
Overrides:
addAll in class AbstractFloatList
See Also:
List.add(int,Object)