de.lmu.ifi.dbs.elki.utilities.datastructures.heap
Class KNNList.DBIDView

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

protected static class KNNList.DBIDView
extends AbstractList<DBID>
implements ArrayDBIDs

A view on the DBIDs of the result


Field Summary
(package private)  List<? extends DistanceResultPair<?>> parent
          The true list.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
KNNList.DBIDView(List<? extends DistanceResultPair<?>> parent)
          Constructor.
 
Method Summary
 Collection<DBID> asCollection()
          Retrieve collection access to the IDs
 DBID get(int i)
           
 Iterator<DBID> iterator()
          Retrieve Iterator access to the IDs.
 int size()
          Retrieve the collection / data 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 de.lmu.ifi.dbs.elki.database.ids.DBIDs
contains, isEmpty
 
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<?>> parent
The true list.

Constructor Detail

KNNList.DBIDView

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

Parameters:
parent - Owner
Method Detail

get

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

asCollection

public Collection<DBID> asCollection()
Description copied from interface: DBIDs
Retrieve collection access to the IDs

Specified by:
asCollection in interface DBIDs
Returns:
a collection of IDs

iterator

public Iterator<DBID> iterator()
Description copied from interface: DBIDs
Retrieve Iterator access to the IDs.

Specified by:
iterator in interface DBIDs
Specified by:
iterator in interface Iterable<DBID>
Specified by:
iterator in interface Collection<DBID>
Specified by:
iterator in interface List<DBID>
Overrides:
iterator in class AbstractList<DBID>
Returns:
an iterator for the IDs

size

public int size()
Description copied from interface: DBIDs
Retrieve the collection / data size.

Specified by:
size in interface DBIDs
Specified by:
size in interface Collection<DBID>
Specified by:
size in interface List<DBID>
Specified by:
size in class AbstractCollection<DBID>
Returns:
collection size

Release 0.4.0 (2011-09-20_1324)