org.planx.xmlstore.references
Class RelativeReference<R>
java.lang.Object
org.planx.xmlstore.references.RelativeReference<R>
- All Implemented Interfaces:
- Reference
- Direct Known Subclasses:
- RelativeDualReference
public class RelativeReference<R>
- extends Object
- implements Reference
A RelativeReference consists of a Reference
and a path. The path is a list of integers specifying, from the
origin, the indexes of children to visit in order to reach the Node
identified by this RelativeReference.
- Author:
- Thomas Ambus
RelativeReference
public RelativeReference(R root)
RelativeReference
public RelativeReference(R root,
int childIndex)
RelativeReference
public RelativeReference(RelativeReference<R> parent,
int childIndex)
isRoot
public boolean isRoot()
getRoot
public R getRoot()
getIndex
public int getIndex()
getPath
public int[] getPath()
equals
public boolean equals(Object o)
- Returns
true if and only if the specified object is a
RelativeReference consisting of a root equal to the
root of this reference, and a path equal to the path of this reference.
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2005 Plan-X. All Rights Reserved.