| 
				
  | 
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.index.tree.TreeIndexPath<E>
E - the type of Entry used in the indexpublic class TreeIndexPath<E extends Entry>
Represents a path to a node in an index structure.
| Field Summary | |
|---|---|
private  TreeIndexPathComponent<E> | 
lastPathComponent
Last path component.  | 
private  TreeIndexPath<E> | 
parentPath
Path representing the parent, null if lastPathComponent represents the root.  | 
| Constructor Summary | |
|---|---|
  | 
TreeIndexPath(List<TreeIndexPathComponent<E>> path)
Constructs a path from a list of path components, uniquely identifying the path from the root of the index to a specific node.  | 
protected  | 
TreeIndexPath(List<TreeIndexPathComponent<E>> path,
              int length)
Constructs a new IndexPath with the identified path components of length length. | 
protected  | 
TreeIndexPath(TreeIndexPath<E> parent,
              TreeIndexPathComponent<E> lastElement)
Constructs a new IndexPath, which is the path identified by parent ending in lastElement. | 
  | 
TreeIndexPath(TreeIndexPathComponent<E> singlePath)
Constructs a IndexPath containing only a single element.  | 
| 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 the two index paths are of the same length, and contain the
 same components (.equals), false otherwise. | 
 TreeIndexPathComponent<E> | 
getLastPathComponent()
Returns the last component of this path.  | 
 TreeIndexPath<E> | 
getParentPath()
Returns a path containing all the elements of this object, except the last path component.  | 
 List<TreeIndexPathComponent<E>> | 
getPath()
Returns an ordered list of IndexPathComponents containing the components of this IndexPath.  | 
 TreeIndexPathComponent<E> | 
getPathComponent(int element)
Returns the path component at the specified index.  | 
 int | 
getPathCount()
Returns the number of elements in the path.  | 
 int | 
hashCode()
Returns the hash code for this index path.  | 
 boolean | 
isDescendant(TreeIndexPath<E> aIndexPath)
Returns true if aIndexPath is a descendant of this IndexPath. | 
 TreeIndexPath<E> | 
pathByAddingChild(TreeIndexPathComponent<E> child)
Returns a new path containing all the elements of this object plus child. | 
 String | 
toString()
Returns a string that displays the components of this index path.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private TreeIndexPath<E extends Entry> parentPath
private TreeIndexPathComponent<E extends Entry> lastPathComponent
| Constructor Detail | 
|---|
public TreeIndexPath(List<TreeIndexPathComponent<E>> path)
path - a list of IndexPathComponents representing the path to a nodepublic TreeIndexPath(TreeIndexPathComponent<E> singlePath)
singlePath - a IndexPathComponent representing the path to a node
protected TreeIndexPath(TreeIndexPath<E> parent,
                        TreeIndexPathComponent<E> lastElement)
parent ending in lastElement.
parent - the parent pathlastElement - the last path component
protected TreeIndexPath(List<TreeIndexPathComponent<E>> path,
                        int length)
length.
path - the whole pathlength - the length of the newly created index path| Method Detail | 
|---|
public List<TreeIndexPathComponent<E>> getPath()
public TreeIndexPathComponent<E> getLastPathComponent()
public int getPathCount()
public TreeIndexPathComponent<E> getPathComponent(int element)
element - an int specifying an element in the path, where 0 is the
        first element in the path
IllegalArgumentException - if the index is beyond the length of the
         pathpublic boolean equals(Object o)
true if this == o has the value
 true or o is not null and o is of the same class as this
 instance and the two index paths are of the same length, and contain the
 same components (.equals), false otherwise.
equals in class ObjectTreeIndexPathComponent.equals(Object)public int hashCode()
hashCode in class Objectpublic boolean isDescendant(TreeIndexPath<E> aIndexPath)
aIndexPath is a descendant of this IndexPath.
 A IndexPath P1 is a descendent of a IndexPath P2 if P1 contains all of the
 components that make up P2's path. For example, if this object has the path
 [a, b], and aIndexPath has the path [a, b, c], then
 aIndexPath is a descendant of this object. However, if
 aIndexPath has the path [a], then it is not a descendant of
 this object.
aIndexPath - the index path to be tested
aIndexPath is a descendant of this pathpublic TreeIndexPath<E> pathByAddingChild(TreeIndexPathComponent<E> child)
child. child will be the last element of the
 newly created IndexPath. This will throw a NullPointerException if child is
 null.
child - the last element of the newly created IndexPath
childpublic TreeIndexPath<E> getParentPath()
public String toString()
toString in class Object
  | 
                
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||