de.lmu.ifi.dbs.elki.utilities.datastructures.heap
Class KNNList.DistanceView<D extends Distance<D>>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<D>
          extended by de.lmu.ifi.dbs.elki.utilities.datastructures.heap.KNNList.DistanceView<D>
All Implemented Interfaces:
Iterable<D>, Collection<D>, List<D>
Enclosing class:
KNNList<D extends Distance<D>>

protected static class KNNList.DistanceView<D extends Distance<D>>
extends AbstractList<D>
implements List<D>

A view on the Distances of the result


Field Summary
(package private)  List<? extends DistanceResultPair<D>> parent
          The true list.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
KNNList.DistanceView(List<? extends DistanceResultPair<D>> parent)
          Constructor.
 
Method Summary
 D get(int i)
           
 Iterator<D> iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Field Detail

parent

final List<? extends DistanceResultPair<D extends Distance<D>>> parent
The true list.

Constructor Detail

KNNList.DistanceView

public KNNList.DistanceView(List<? extends DistanceResultPair<D>> parent)
Constructor.

Parameters:
parent - Owner
Method Detail

get

public D get(int i)
Specified by:
get in interface List<D extends Distance<D>>
Specified by:
get in class AbstractList<D extends Distance<D>>

iterator

public Iterator<D> iterator()
Specified by:
iterator in interface Iterable<D extends Distance<D>>
Specified by:
iterator in interface Collection<D extends Distance<D>>
Specified by:
iterator in interface List<D extends Distance<D>>
Overrides:
iterator in class AbstractList<D extends Distance<D>>

size

public int size()
Specified by:
size in interface Collection<D extends Distance<D>>
Specified by:
size in interface List<D extends Distance<D>>
Specified by:
size in class AbstractCollection<D extends Distance<D>>

Release 0.4.0 (2011-09-20_1324)