JXTA

net.jxta.document
Class Attribute

java.lang.Object
  extended by net.jxta.document.Attribute

public class Attribute
extends Object

A name value pair which is associated with some base object.

See Also:
Attributable, StructuredDocument, Element

Constructor Summary
Attribute(Attributable owner, String name, String value)
          Constructor for a new attribute which is associated with an
Attribute(String name, String value)
          Constructor for a new attribute which can be added to an Attributable.
 
Method Summary
protected  Object clone()
          
 boolean equals(Object target)
           The two attributes are the same if they have the same owner, name and value.
 String getName()
          Return name of this attribute
 Attributable getOwner()
          Return the Attributable which is the owner of this attribute.
 String getValue()
          Return value of this attribute
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(String name,
                 String value)
Constructor for a new attribute which can be added to an Attributable.

Parameters:
name - Name for this attribute.
value - Value for this attribute.

Attribute

public Attribute(Attributable owner,
                 String name,
                 String value)
Constructor for a new attribute which is associated with an

Parameters:
owner - The Atrributable owner of this attribute or null.
name - Name for this attribute.
value - Value for this attribute.
Method Detail

clone

protected Object clone()

Overrides:
clone in class Object

equals

public boolean equals(Object target)
The two attributes are the same if they have the same owner, name and value.

Overrides:
equals in class Object
Parameters:
target - Attribute to be checked with
Returns:
boolean if the attributes are equal otherwise false.

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object

getName

public String getName()
Return name of this attribute

Returns:
String containing the attribute's name.

getOwner

public Attributable getOwner()
Return the Attributable which is the owner of this attribute.

Returns:
Attributable object which owns this attribute.

getValue

public String getValue()
Return value of this attribute

Returns:
String containing the attribute's value.

JXSE