org.springframework.roo.project
Class Property

java.lang.Object
  extended by org.springframework.roo.project.Property
All Implemented Interfaces:
Comparable<Property>

public class Property
extends Object
implements Comparable<Property>

Simplified immutable representation of a property.

Since:
1.1
Author:
Alan Stewart

Constructor Summary
Property(Element element)
          Convenience constructor for creating a property instance from a XML Element
Property(String name)
          Convenience constructor creating a property instance
Property(String name, String value)
          Convenience constructor creating a property instance
 
Method Summary
 int compareTo(Property o)
           
 boolean equals(Object obj)
           
 String getName()
          The name of a property
 String getValue()
          The value of a property
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Property

public Property(String name,
                String value)
Convenience constructor creating a property instance

Parameters:
name - the property name (required)
value - the property value (required)

Property

public Property(String name)
Convenience constructor creating a property instance

Parameters:
name - the property name (required)

Property

public Property(Element element)
Convenience constructor for creating a property instance from a XML Element

Parameters:
element - containing the property definition (required)
Method Detail

getName

public String getName()
The name of a property

Returns:
the name of the property (never null)

getValue

public String getValue()
The value of a property

Returns:
the url

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(Property o)
Specified by:
compareTo in interface Comparable<Property>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.