net.infonode.properties.util
Class PropertyPath

java.lang.Object
  extended by net.infonode.properties.util.PropertyPath

public class PropertyPath
extends java.lang.Object

A path to a property.

Version:
$Revision: 1.3 $
Author:
$Author: jesper $

Field Summary
private  Property property
           
private  PropertyPath tail
           
 
Constructor Summary
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
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

property

private Property property

tail

private PropertyPath tail
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 prepend
tail - 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