quoggles.auxiliary.attributes
Class CollAttribute

java.lang.Object
  |
  +--org.graffiti.attributes.AbstractAttribute
        |
        +--quoggles.auxiliary.attributes.CollAttribute
All Implemented Interfaces:
org.graffiti.attributes.Attribute, org.graffiti.core.DeepCopy, org.graffiti.plugin.Displayable

public class CollAttribute
extends org.graffiti.attributes.AbstractAttribute

Contains a Collection.

Version:
$Revision: 1.4 $

Field Summary
private  java.util.Collection value
          The value of this CollectionAttribute.
 
Fields inherited from class org.graffiti.attributes.AbstractAttribute
id
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
CollAttribute(java.lang.String id)
          Constructs a new instance of a CollectionAttribute.
CollAttribute(java.lang.String id, java.util.Collection value)
          Constructs a new instance of a CollectionAttribute with the given value.
 
Method Summary
 java.lang.Object copy()
          Returns a deep copy of this instance.
protected  void doSetValue(java.lang.Object o)
          Sets the value of the Attribute.
 java.util.Collection getCollection()
          Returns the value of this object.
 java.lang.Object getValue()
          Returns the value of this attribute, i.e. contained Sting object.
 void setCollection(java.util.Collection value)
          Sets the value of this object.
 void setDefaultValue()
           
 java.lang.String toString(int n)
           
 java.lang.String toXMLString()
           
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
callPostAttributeAdded, callPostAttributeChanged, callPostAttributeRemoved, callPreAttributeAdded, callPreAttributeChanged, callPreAttributeRemoved, getAttributable, getDescription, getId, getName, getParent, getPath, getSpaces, getStandardXML, setDescription, setParent, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private java.util.Collection value
The value of this CollectionAttribute.

Constructor Detail

CollAttribute

public CollAttribute(java.lang.String id)
Constructs a new instance of a CollectionAttribute.

Parameters:
id - the id of the Attribute.

CollAttribute

public CollAttribute(java.lang.String id,
                     java.util.Collection value)
Constructs a new instance of a CollectionAttribute with the given value.

Parameters:
id - the id of the attribute.
value - the value of the Attribute.
Method Detail

setDefaultValue

public void setDefaultValue()
See Also:
Attribute.setDefaultValue()

setCollection

public void setCollection(java.util.Collection value)
Sets the value of this object. The ListenerManager is informed by the method setValue().

Parameters:
value - the new value of this object.

getCollection

public java.util.Collection getCollection()
Returns the value of this object.

Returns:
the value of this object.

getValue

public java.lang.Object getValue()
Returns the value of this attribute, i.e. contained Sting object.

Returns:
the value of the attribute, i.e. contained String object.

copy

public java.lang.Object copy()
Returns a deep copy of this instance.

Returns:
a deep copy of this instance.

toString

public java.lang.String toString(int n)
Specified by:
toString in interface org.graffiti.attributes.Attribute
Overrides:
toString in class org.graffiti.attributes.AbstractAttribute
See Also:
Attribute.toString(int)

doSetValue

protected void doSetValue(java.lang.Object o)
                   throws java.lang.IllegalArgumentException
Sets the value of the Attribute. The ListenerManager is informed by the method setValue().

Specified by:
doSetValue in class org.graffiti.attributes.AbstractAttribute
Parameters:
o - the new value of the attribute.
Throws:
java.lang.IllegalArgumentException - if the parameter has not the appropriate class for this Attribute.

toXMLString

public java.lang.String toXMLString()
Specified by:
toXMLString in interface org.graffiti.plugin.Displayable
Overrides:
toXMLString in class org.graffiti.attributes.AbstractAttribute
See Also:
Displayable.toXMLString()