org.foray.ps
Class PsPath

java.lang.Object
  extended by org.foray.ps.PsPath

public class PsPath
extends Object

A list of path elements that defines a path.


Constructor Summary
PsPath()
           
 
Method Summary
 void add(PsPathElement newElement)
          Adds a new element to this path.
 PsPathElement getElement(int index)
          Returns a specific element from the path.
 PsPathElement getLastElement()
          Returns the last element in this path.
 PsPathMove getStartCurrentSubPath()
          Returns the element that starts the current sub path.
 boolean isEmpty()
          Indicates whether this path has any elements in it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsPath

public PsPath()
Method Detail

add

public void add(PsPathElement newElement)
Adds a new element to this path.

Parameters:
newElement - The new element to be added.

getElement

public PsPathElement getElement(int index)
Returns a specific element from the path.

Parameters:
index - The index to the path element.
Returns:
The path element at index index.

isEmpty

public boolean isEmpty()
Indicates whether this path has any elements in it.

Returns:
True iff this path has no elements in it.

getLastElement

public PsPathElement getLastElement()
Returns the last element in this path.

Returns:
The last element in this path, or null if the path is empty.

getStartCurrentSubPath

public PsPathMove getStartCurrentSubPath()
Returns the element that starts the current sub path.

Returns:
The element that starts the current sub path.


Copyright © 2017. All rights reserved.