org.xerial.util.xml.index
Class InvertedPath

java.lang.Object
  extended by org.xerial.util.xml.index.InvertedPath
All Implemented Interfaces:
Comparable<InvertedPath>, Iterable<String>

public class InvertedPath
extends Object
implements Comparable<InvertedPath>, Iterable<String>

InvertedPath: /booklist/book/authorというXPathのinverted pathは、author.book.booklist

Author:
leo

Constructor Summary
InvertedPath()
           
InvertedPath(InvertedPath invertedPath)
          copy constructor
InvertedPath(String stringRepresentationOfInvertedPath)
           
 
Method Summary
 void addChild(String tagName)
           
 void addParent(String tagName)
           
protected  InvertedPath clone()
           
 int compareTo(InvertedPath other)
           
 boolean equals(Object obj)
           
 String getLastParent()
           
 Iterator<String> iterator()
           
 void removeFirstChild()
           
 void removeLastParent()
           
 Integer size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvertedPath

public InvertedPath()

InvertedPath

public InvertedPath(String stringRepresentationOfInvertedPath)

InvertedPath

public InvertedPath(InvertedPath invertedPath)
copy constructor

Parameters:
invertedPath -
Method Detail

addParent

public void addParent(String tagName)

addChild

public void addChild(String tagName)

getLastParent

public String getLastParent()

removeLastParent

public void removeLastParent()
                      throws NoSuchElementException
Throws:
NoSuchElementException - if this inverted path contains no step

removeFirstChild

public void removeFirstChild()
                      throws NoSuchElementException
Throws:
NoSuchElementException

size

public Integer size()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(InvertedPath other)
Specified by:
compareTo in interface Comparable<InvertedPath>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

protected InvertedPath clone()
                      throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.