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

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

public static class AbstractFloatBigList.FloatSubList
extends AbstractFloatBigList
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatBigList
AbstractFloatBigList.FloatSubList
 
Field Summary
static long serialVersionUID
           
 
Constructor Summary
AbstractFloatBigList.FloatSubList(FloatBigList l, long from, long to)
           
 
Method Summary
 boolean add(float k)
           
 void add(long index, float k)
           
 boolean addAll(long index, Collection<? extends Float> c)
          Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
 boolean addAll(long index, FloatCollection c)
          Delegates to a more generic method.
 boolean addAll(long index, FloatList l)
           
 void addElements(long index, float[][] a, long offset, long length)
          Adds elements to this type-specific big list one-by-one.
 void clear()
           
 void getElements(long from, float[][] a, long offset, long length)
          Copies element of this type-specific big list into the given big array one-by-one.
 float getFloat(long index)
           
 FloatBigListIterator listIterator(long index)
          Returns a type-specific list iterator on this type-specific big 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(Object o)
          Delegates to the type-specific rem() method.
 void removeElements(long from, long to)
          Removes elements of this type-specific big list one-by-one.
 float removeFloat(long index)
           
 float set(long index, float k)
           
 long size64()
          Returns the size of this data structure as a long.
 FloatBigList subList(long from, long to)
          Returns a type-specific view of the portion of this type-specific big list from the index from, inclusive, to the index to, exclusive.
 
Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatBigList
add, addAll, addAll, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, getFloat, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekFloat, pop, popFloat, push, push, remove, remove, removeFloat, set, set, size, size, 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 it.unimi.dsi.fastutil.floats.FloatCollection
containsAll, floatIterator, removeAll, retainAll, toArray, toArray, toFloatArray, toFloatArray
 
Methods inherited from interface java.util.Collection
add, contains, containsAll, isEmpty, removeAll, retainAll, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

AbstractFloatBigList.FloatSubList

public AbstractFloatBigList.FloatSubList(FloatBigList l,
                                         long from,
                                         long to)
Method Detail

add

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

add

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

addAll

public boolean addAll(long index,
                      Collection<? extends Float> c)
Description copied from interface: BigList
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).

Specified by:
addAll in interface BigList<Float>
Overrides:
addAll in class AbstractFloatBigList
Parameters:
index - index at which to insert the first element from the specified collection.
c - collection containing elements to be added to this big list.
Returns:
true if this big list changed as a result of the call
See Also:
List.addAll(int, Collection)

getFloat

public float getFloat(long index)
Specified by:
getFloat in interface FloatBigList
See Also:
BigList.get(long)

removeFloat

public float removeFloat(long index)
Specified by:
removeFloat in interface FloatBigList
Overrides:
removeFloat in class AbstractFloatBigList
See Also:
BigList.remove(long)

set

public float set(long index,
                 float k)
Specified by:
set in interface FloatBigList
Overrides:
set in class AbstractFloatBigList
See Also:
BigList.set(long,Object)

clear

public void clear()
Specified by:
clear in interface Collection<Float>
Overrides:
clear in class AbstractCollection<Float>

size64

public long size64()
Description copied from interface: Size64
Returns the size of this data structure as a long.

Specified by:
size64 in interface Size64
Returns:
the size of this data structure.

getElements

public void getElements(long from,
                        float[][] a,
                        long offset,
                        long length)
Description copied from class: AbstractFloatBigList
Copies element of this type-specific big list into the given big 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 FloatBigList
Overrides:
getElements in class AbstractFloatBigList
Parameters:
from - the start index (inclusive).
a - the destination big array.
offset - the offset into the destination big array where to store the first element copied.
length - the number of elements to be copied.

removeElements

public void removeElements(long from,
                           long to)
Description copied from class: AbstractFloatBigList
Removes elements of this type-specific big 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 FloatBigList
Overrides:
removeElements in class AbstractFloatBigList
Parameters:
from - the start index (inclusive).
to - the end index (exclusive).

addElements

public void addElements(long index,
                        float[][] a,
                        long offset,
                        long length)
Description copied from class: AbstractFloatBigList
Adds elements to this type-specific big 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 FloatBigList
Overrides:
addElements in class AbstractFloatBigList
Parameters:
index - the index at which to add elements.
a - the big array containing the elements.
offset - the offset of the first element to add.
length - the number of elements to add.

listIterator

public FloatBigListIterator listIterator(long index)
Description copied from interface: FloatBigList
Returns a type-specific list iterator on this type-specific big list starting at a given index.

Specified by:
listIterator in interface BigList<Float>
Specified by:
listIterator in interface FloatBigList
Overrides:
listIterator in class AbstractFloatBigList
Parameters:
index - index of first element to be returned from the big-list iterator.
Returns:
a big-list iterator of the elements in this big list, starting at the specified position in this big list.
See Also:
BigList.listIterator(long)

subList

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

Note that this specification strengthens the one given in BigList.subList(long,long).

Specified by:
subList in interface BigList<Float>
Specified by:
subList in interface FloatBigList
Overrides:
subList in class AbstractFloatBigList
Parameters:
from - the starting element (inclusive).
to - the ending element (exclusive).
Returns:
a big sublist view of this big list.
See Also:
BigList.subList(long,long)

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 AbstractFloatBigList
See Also:
Collection.remove(Object)

remove

public boolean remove(Object o)
Description copied from class: AbstractFloatCollection
Delegates to the type-specific rem() method.

Specified by:
remove in interface Collection<Float>
Overrides:
remove in class AbstractFloatCollection

addAll

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

Specified by:
addAll in interface FloatBigList
Overrides:
addAll in class AbstractFloatBigList
See Also:
List.addAll(int,java.util.Collection)

addAll

public boolean addAll(long index,
                      FloatList l)