Package adams.core.discovery
Class PropertyPath.PathElement
- java.lang.Object
-
- adams.core.discovery.PropertyPath.PathElement
-
- All Implemented Interfaces:
CloneHandler<PropertyPath.PathElement>
- Enclosing class:
- PropertyPath
public static class PropertyPath.PathElement extends Object implements CloneHandler<PropertyPath.PathElement>
Represents a single element of a property path.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_Indexthe index of the array (-1 for none).protected Stringm_Namethe property.protected PropertyPath.PathElementTypem_Typethe element type.
-
Constructor Summary
Constructors Constructor Description PathElement(String property)initializes the path element with the given property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyPath.PathElementgetClone()returns a clone of the current object.intgetIndex()returns the index of the property, -1 if the property is not an index-based one.StringgetName()returns the name of the property.PropertyPath.PathElementTypegetType()Returns the type of path element this is.StringtoString()returns the element once again as string.
-
-
-
Field Detail
-
m_Name
protected String m_Name
the property.
-
m_Index
protected int m_Index
the index of the array (-1 for none).
-
m_Type
protected PropertyPath.PathElementType m_Type
the element type.
-
-
Constructor Detail
-
PathElement
public PathElement(String property)
initializes the path element with the given property.- Parameters:
property- the property to initialize with
-
-
Method Detail
-
getClone
public PropertyPath.PathElement getClone()
returns a clone of the current object.- Specified by:
getClonein interfaceCloneHandler<PropertyPath.PathElement>- Returns:
- the clone of the current state
-
getName
public String getName()
returns the name of the property.- Returns:
- the name of the property
-
getIndex
public int getIndex()
returns the index of the property, -1 if the property is not an index-based one.- Returns:
- the index of the property
-
getType
public PropertyPath.PathElementType getType()
Returns the type of path element this is.- Returns:
- the type
-
-