Class FunctionTreePath
java.lang.Object
org.dawnsci.common.widgets.gda.function.FunctionTreePath
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateChildPath(IFunction newSegment) Returns a copy of this tree path with the given segment added at the end.booleanReturns the first element in this path, ornullif this path has no segments.Returns the last element in this path, ornullif this path has no segments.Returns a copy of this tree path with one segment removed from the end, ornullif this tree path has no segments.getSegment(int index) Returns the element at the specified index in this path.intReturns the number of elements in this path.inthashCode()(non-Javadoc)booleanbooleanstartsWith(FunctionTreePath starts) Returns whether this path starts with the same segments as the given path, using the given comparer to compare segments.
-
Field Details
-
ROOT
-
-
Constructor Details
-
FunctionTreePath
-
-
Method Details
-
getSegment
Returns the element at the specified index in this path.- Parameters:
index- index of element to return- Returns:
- element at the specified index
-
getSegmentCount
public int getSegmentCount()Returns the number of elements in this path.- Returns:
- the number of elements in this path
-
getFirstSegment
Returns the first element in this path, ornullif this path has no segments.- Returns:
- the first element in this path
-
getLastSegment
Returns the last element in this path, ornullif this path has no segments.- Returns:
- the last element in this path
-
equals
-
hashCode
public int hashCode()(non-Javadoc) -
startsWith
Returns whether this path starts with the same segments as the given path, using the given comparer to compare segments.- Parameters:
treePath- path to compare to- Returns:
- whether the given path is a prefix of this path, or the same as this path
-
getParentPath
Returns a copy of this tree path with one segment removed from the end, ornullif this tree path has no segments.- Returns:
- a tree path
-
createChildPath
Returns a copy of this tree path with the given segment added at the end.- Parameters:
newSegment-- Returns:
- a tree path
-
isPathIn
-