Package weka.core
Class PropertyPath.Path
java.lang.Object
weka.core.PropertyPath.Path
- All Implemented Interfaces:
RevisionHandler
- Enclosing class:
- PropertyPath
Contains a (property) path structure
- Version:
- $Revision: 8034 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int index) returns the element at the given indexReturns the revision string.static PropertyPath.Path
returns a path object based on the given path stringint
size()
returns the number of path elements of this structuresubpath
(int startIndex) returns a subpath of the current structure, starting with the specified element index up to the endsubpath
(int startIndex, int endIndex) returns a subpath of the current structure, starting with the specified element index up.toString()
returns the structure again as a dot-path
-
Constructor Details
-
Path
uses the given dot-path- Parameters:
path
- path in dot-notation
-
Path
uses the vector with PathElement objects to initialize with- Parameters:
elements
- the PathElements to use
-
Path
uses the given array as elements for the path- Parameters:
elements
- the path elements to use
-
-
Method Details
-
get
returns the element at the given index- Parameters:
index
- the index of the element to return- Returns:
- the specified element
-
size
public int size()returns the number of path elements of this structure- Returns:
- the number of path elements
-
parsePath
returns a path object based on the given path string- Parameters:
path
- path to work on- Returns:
- the path structure
-
subpath
returns a subpath of the current structure, starting with the specified element index up to the end- Parameters:
startIndex
- the first element of the subpath- Returns:
- the new subpath
-
subpath
returns a subpath of the current structure, starting with the specified element index up. The endIndex specifies the element that is not part of the new subpath. In other words, the new path contains the elements from "startIndex" up to "(endIndex-1)".- Parameters:
startIndex
- the first element of the subpathendIndex
- the element that is after the last added element- Returns:
- the new subpath
-
toString
returns the structure again as a dot-path -
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-