Package elki.index.tree
Class IndexTreePath<E>
- java.lang.Object
-
- elki.index.tree.IndexTreePath<E>
-
- Type Parameters:
E- the type of Entry used in the index
public class IndexTreePath<E> extends java.lang.ObjectRepresents a path to a node in an index structure.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private EentryThe entry of this component.private intindexThe index of this component in its parent.private IndexTreePath<E>parentPathPath representing the parent, null if lastPathComponent represents the root.
-
Constructor Summary
Constructors Constructor Description IndexTreePath(IndexTreePath<E> parent, E entry, int index)Constructs a new IndexPath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)EgetEntry()Returns the entry of the component.intgetIndex()Returns the index of the component in its parent.IndexTreePath<E>getParentPath()Returns a path containing all the elements of this object, except the last path component.intgetPathCount()Returns the number of elements in the path.inthashCode()java.lang.StringtoString()Returns a string that displays the components of this index path.
-
-
-
Field Detail
-
parentPath
private IndexTreePath<E> parentPath
Path representing the parent, null if lastPathComponent represents the root.
-
entry
private final E entry
The entry of this component.
-
index
private final int index
The index of this component in its parent.
-
-
Constructor Detail
-
IndexTreePath
public IndexTreePath(IndexTreePath<E> parent, E entry, int index)
Constructs a new IndexPath.- Parameters:
parent- the parent pathentry- the entry of the componentindex- 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 int getIndex()
Returns the index of the component in its parent.- Returns:
- the index of the component in its parent
-
getPathCount
public int getPathCount()
Returns the number of elements in the path.- Returns:
- an int giving a count of items the path
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getParentPath
public IndexTreePath<E> getParentPath()
Returns a path containing all the elements of this object, except the last path component.- Returns:
- a path containing all the elements of this object, except the last path component
-
toString
public java.lang.String toString()
Returns a string that displays the components of this index path.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of the components of this index path
-
-