Openwings API Documentation (v1.1)

net.openwings.identity
Class Attribute

java.lang.Object
  extended bynet.openwings.identity.Attribute
All Implemented Interfaces:
java.io.Serializable

public final class Attribute
extends java.lang.Object
implements java.io.Serializable

This class is a universal attribute used throughout Openwings. An attribute is defined as a name-value pair, where the name is a String and the value is any serializable Java Object

See Also:
Serialized Form

Constructor Summary
Attribute()
          Default constructor
Attribute(java.lang.String name, java.lang.Object value)
          This simple constructor creates an Attribute with the given name and value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method overrides the default equals() implementation.
 java.lang.String getName()
          This method returns the name / key for the attribute
 java.lang.Object getValue()
          This method returns the value of the attribute
 int hashCode()
          overrides default hashCode() method.
 void setName(java.lang.String name)
          This method sets the name / key for the attribute
 void setValue(java.lang.Object value)
          This method sets the value of the attribute
 java.lang.String toString()
          overrides default toString() method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute()
Default constructor


Attribute

public Attribute(java.lang.String name,
                 java.lang.Object value)
This simple constructor creates an Attribute with the given name and value.

Parameters:
name - name of the attribute
value - value of the attribute
Method Detail

getName

public java.lang.String getName()
This method returns the name / key for the attribute

Returns:
name of the attribute

setName

public void setName(java.lang.String name)
This method sets the name / key for the attribute

Parameters:
name - name of the attribute

getValue

public java.lang.Object getValue()
This method returns the value of the attribute

Returns:
serializable Java object

setValue

public void setValue(java.lang.Object value)
This method sets the value of the attribute

Returns:
serializable Java object

equals

public final boolean equals(java.lang.Object obj)
This method overrides the default equals() implementation. Equality is based on the name and the value, using the value class's equals() implementation.


hashCode

public final int hashCode()
overrides default hashCode() method.


toString

public java.lang.String toString()
overrides default toString() method.


Openwings API Documentation (v1.1)