org.xerial.util.xml
Class SinglePath
java.lang.Object
org.xerial.util.xml.SinglePath
- All Implemented Interfaces:
- Comparable<SinglePath>, Iterable<String>
public class SinglePath
- extends Object
- implements Comparable<SinglePath>, Iterable<String>
親子関係(/)だけからなる単純なPath
- Author:
- leo
SinglePath
public SinglePath()
- 相対パスを作成
SinglePath
public SinglePath(SinglePath.PathType pathType)
- パスを作成
- Parameters:
pathType - PathType.AbsolutePath(ルートから始まる絶対path) or PathType.RelativePath (相対path)
SinglePath
public SinglePath(String pathExpression)
SinglePath
public SinglePath(SinglePath path,
String childTag)
- pathにchildTagを足して、新しいPathを作成
- Parameters:
path - ベースとなるpathchildTag -
getTag
public String getTag(int index)
getLeaf
public String getLeaf()
addChild
public void addChild(String tagName)
removeLastChild
public void removeLastChild()
size
public Integer size()
toString
public String toString()
- Overrides:
toString in class Object
compareTo
public int compareTo(SinglePath other)
- Specified by:
compareTo in interface Comparable<SinglePath>
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
isAbsolutePath
public boolean isAbsolutePath()
clone
protected Object clone()
throws CloneNotSupportedException
- Overrides:
clone in class Object
- Throws:
CloneNotSupportedException
iterator
public Iterator<String> iterator()
- Specified by:
iterator in interface Iterable<String>

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