Class StringPath
java.lang.Object
com.inductiveautomation.ignition.common.StringPath
- All Implemented Interfaces:
- Path,- Serializable,- Comparable<StringPath>
- Direct Known Subclasses:
- StringPath.CaseSensitiveStringPath
A simple path based on string based path components. Comparisons are made in a case-insensitive manner.
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringPathAn emptyStringPath, i.e.Fields inherited from interface com.inductiveautomation.ignition.common.PathSERIALIZATION_WHITELIST
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCreate a newStringPath.CaseSensitiveStringPaththat has the same parts as thisStringPath.intcompareTo(StringPath that) booleanstatic StringPathextend(StringPath parent, StringPath other) static StringPathextend(StringPath parent, String... subparts) static StringPathCreates a string path from a tag path.static StringPathCreates a string path from a tag path.getChildPath(String... pathParts) Convenience function to return the last path element.Returns the parent, or null if at the root level.String[]getParts()getPathComponent(int i) Returns the path element at the specified location.intReturns the number of elements in the path, which can be retrieved through getPathComponent().inthashCode()booleanisAncestorOf(Path child) Returns whether the provided path is a child path of this one.booleanisParentOf(Path child) static booleanisRelative(StringPath path) booleanisRoot()static StringPathmakeRelative(StringPath toRelative, StringPath root) static StringPathstatic StringPathstatic StringPathremoveRelative(StringPath relative, StringPath root) subPath()Returns the path, minus the first element.subPath(int start, int len) toString()
- 
Field Details- 
ROOTAn emptyStringPath, i.e. a path with zero components and zero length.
- 
PATH_SEPARATOR- See Also:
 
- 
PATH_RELATIVE- See Also:
 
- 
PATH_RELATIVE_UP- See Also:
 
 
- 
- 
Constructor Details- 
StringPath
 
- 
- 
Method Details- 
getParts
- 
of
- 
fromCreates a string path from a tag path. String paths do not support Source or Property, so those elements will be ignored.
- 
fromCreates a string path from a tag path. String paths do not support Source or Property, so those elements will be ignored.
- 
parse- Parameters:
- value- A path to parse, like "path/to/thing". Null will be treated like empty string: both will create a path of zero length.
 
- 
extend
- 
extend
- 
makeRelative
- 
isRelative
- 
removeRelative
- 
getPathLengthpublic int getPathLength()Description copied from interface:PathReturns the number of elements in the path, which can be retrieved through getPathComponent().- Specified by:
- getPathLengthin interface- Path
 
- 
subPathReturns the path, minus the first element.
- 
subPath
- 
getParentPathReturns the parent, or null if at the root level.- Specified by:
- getParentPathin interface- Path
 
- 
getChildPath
- 
getPathComponentDescription copied from interface:PathReturns the path element at the specified location.- Specified by:
- getPathComponentin interface- Path
 
- 
getLastPathComponentDescription copied from interface:PathConvenience function to return the last path element.- Specified by:
- getLastPathComponentin interface- Path
 
- 
isRootpublic boolean isRoot()- Returns:
- true if the path length is zero
 
- 
isParentOf
- 
isAncestorOfDescription copied from interface:PathReturns whether the provided path is a child path of this one.- Specified by:
- isAncestorOfin interface- Path
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
compareTo- Specified by:
- compareToin interface- Comparable<StringPath>
 
- 
caseSensitiveCreate a newStringPath.CaseSensitiveStringPaththat has the same parts as thisStringPath.- Returns:
- a StringPath.CaseSensitiveStringPath.
 
 
-