Class FunctionTreePath

java.lang.Object
org.dawnsci.common.widgets.gda.function.FunctionTreePath

public class FunctionTreePath extends Object
  • Field Details

  • Constructor Details

    • FunctionTreePath

      public FunctionTreePath(IFunction[] iFunctions)
  • Method Details

    • getSegment

      public IFunction getSegment(int index)
      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

      public IFunction getFirstSegment()
      Returns the first element in this path, or null if this path has no segments.
      Returns:
      the first element in this path
    • getLastSegment

      public IFunction getLastSegment()
      Returns the last element in this path, or null if this path has no segments.
      Returns:
      the last element in this path
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      (non-Javadoc)
      Overrides:
      hashCode in class Object
      See Also:
    • startsWith

      public boolean startsWith(FunctionTreePath starts)
      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

      public FunctionTreePath getParentPath()
      Returns a copy of this tree path with one segment removed from the end, or null if this tree path has no segments.
      Returns:
      a tree path
    • createChildPath

      public FunctionTreePath createChildPath(IFunction newSegment)
      Returns a copy of this tree path with the given segment added at the end.
      Parameters:
      newSegment -
      Returns:
      a tree path
    • isPathIn

      public boolean isPathIn(IOperator root2)