de.lmu.ifi.dbs.elki.index.tree
Class TreeIndexPathComponent<E extends Entry>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.tree.TreeIndexPathComponent<E>
Type Parameters:
E - the type of Entry used in the index

public class TreeIndexPathComponent<E extends Entry>
extends Object

Represents a component in an IndexPath. A component in an IndexPath consists of the entry of the index (representing a node or a data object) and the index of the component in its parent.


Field Summary
private  E entry
          The entry of this component.
private  Integer index
          The index of this component in its parent.
 
Constructor Summary
TreeIndexPathComponent(E entry, Integer index)
          Creates a new IndexPathComponent.
 
Method Summary
 boolean equals(Object o)
          Returns true if this == o has the value true or o is not null and o is of the same class as this instance and if the entry of this component equals the entry of the o argument, false otherwise.
 E getEntry()
          Returns the entry of the component.
 Integer getIndex()
          Returns the index of the component in its parent.
 int hashCode()
          Returns a hash code for this component.
 String toString()
          Returns a string representation of this component.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entry

private E extends Entry entry
The entry of this component.


index

private Integer index
The index of this component in its parent.

Constructor Detail

TreeIndexPathComponent

public TreeIndexPathComponent(E entry,
                              Integer index)
Creates a new IndexPathComponent.

Parameters:
entry - the entry of the component
index - index of the component in its parent
Method Detail

getEntry

public E getEntry()
Returns the entry of the component.

Returns:
the entry of the component

getIndex

public Integer getIndex()
Returns the index of the component in its parent.

Returns:
the index of the component in its parent

equals

public boolean equals(Object o)
Returns true if this == o has the value true or o is not null and o is of the same class as this instance and if the entry of this component equals the entry of the o argument, false otherwise.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code for this component. The hash code of a TreeIndexPathComponent is defined to be the hash code of its entry.

Overrides:
hashCode in class Object
Returns:
the hash code of the entry of this component

toString

public String toString()
Returns a string representation of this component.

Overrides:
toString in class Object
Returns:
a string representation of the entry of this component followd by the index of this component in its parent

Release 0.4.0 (2011-09-20_1324)