Package net.infonode.properties.util
Class PropertyPath
- java.lang.Object
-
- net.infonode.properties.util.PropertyPath
-
public class PropertyPath extends java.lang.Object
A path to a property.
-
-
Constructor Summary
Constructors Constructor Description PropertyPath(Property property)
Creates a path containing a single property.PropertyPath(Property property, PropertyPath tail)
Creates a path by prepending a path with a property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyPath
copy()
Creates a new path that is a copy of this path.Property
getProperty()
Returns the first property in this path.PropertyPath
getTail()
Returns the path after the first property.
-
-
-
Constructor Detail
-
PropertyPath
public PropertyPath(Property property)
Creates a path containing a single property.- Parameters:
property
- the property
-
PropertyPath
public PropertyPath(Property property, PropertyPath tail)
Creates a path by prepending a path with a property.- Parameters:
property
- the property to prependtail
- the path to prepend to
-
-
Method Detail
-
getProperty
public Property getProperty()
Returns the first property in this path.- Returns:
- the first property in the path
-
getTail
public PropertyPath getTail()
Returns the path after the first property.- Returns:
- the path after the first property
-
copy
public PropertyPath copy()
Creates a new path that is a copy of this path. The properties are not copied.- Returns:
- a copy of this path
-
-