com.sas.hls.common
Class Attribute

java.lang.Object
  extended by com.sas.hls.common.Attribute
All Implemented Interfaces:
Serializable, Cloneable

public class Attribute
extends Object
implements Serializable, Cloneable

A local representation of an attribute defined on an object.

See Also:
Serialized Form

Constructor Summary
Attribute()
          Zero-arg constructor for an Attribute.
Attribute(String name, Serializable value)
          Constructs an Attribute object which associates the given attribute name with the given value.
 
Method Summary
 Attribute clone()
          Create and return a copy of this object.
 boolean equals(Object obj)
          Indicate whether some other object is "equal to" this one.
 String getName()
          Returns a String containing the name of the attribute.
 Serializable getValue()
          Returns the serializable value of this attribute.
 int hashCode()
          Return a hash code value for the object.
 void setName(String name)
          Set the name of this attribute.
 void setValue(Serializable value)
          Set the value of this attribute.
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute()
Zero-arg constructor for an Attribute.


Attribute

public Attribute(String name,
                 Serializable value)
Constructs an Attribute object which associates the given attribute name with the given value.

Parameters:
name - A String containing the name of the attribute to be created. Cannot be null.
value - The value which is assigned to the attribute.
Method Detail

setName

public void setName(String name)
Set the name of this attribute.

Parameters:
name - A String containing the name to give to this attribute.

getName

public String getName()
Returns a String containing the name of the attribute.

Returns:
the name of the attribute.

setValue

public void setValue(Serializable value)
Set the value of this attribute.

Parameters:
value - The serializable value to give to this attribute.

getValue

public Serializable getValue()
Returns the serializable value of this attribute.

Returns:
the value of the attribute.

clone

public Attribute clone()
                throws CloneNotSupportedException
Create and return a copy of this object.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException
See Also:
Object.clone()

hashCode

public int hashCode()
Return a hash code value for the object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Indicate whether some other object is "equal to" this one.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright (c) 2012, SAS Institute Inc., Cary, NC, USA