kaos.kpat.models
Class ModelAttribute

java.lang.Object
  extended by kaos.kpat.models.ModelAttribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, iModelAttribute

public class ModelAttribute
extends java.lang.Object
implements iModelAttribute, java.io.Serializable, java.lang.Comparable

A Policy attribute. $Revision: 1.1.1.1 $

See Also:
Serialized Form

Constructor Summary
ModelAttribute(AttributeMsg attribMsg)
           
ModelAttribute(java.lang.String name, boolean selected)
           
ModelAttribute(java.lang.String name, java.lang.Object value, boolean selected)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Required by 'Comparable' interface, used by TreeSet to sort.
 java.lang.String getName()
           
 java.lang.Object getValue()
           
 boolean isSelected()
           
 void setName(java.lang.String name)
           
 void setSelected(boolean isSelected)
           
 void setValue(java.lang.Object value)
           
 AttributeMsg toAttributeMsg()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelAttribute

public ModelAttribute(java.lang.String name,
                      boolean selected)

ModelAttribute

public ModelAttribute(java.lang.String name,
                      java.lang.Object value,
                      boolean selected)

ModelAttribute

public ModelAttribute(AttributeMsg attribMsg)
Method Detail

toAttributeMsg

public AttributeMsg toAttributeMsg()

setValue

public void setValue(java.lang.Object value)

getValue

public java.lang.Object getValue()

isSelected

public boolean isSelected()
Specified by:
isSelected in interface iModelAttribute

setSelected

public void setSelected(boolean isSelected)
Specified by:
setSelected in interface iModelAttribute

getName

public java.lang.String getName()
Specified by:
getName in interface iModelAttribute

setName

public void setName(java.lang.String name)
Specified by:
setName in interface iModelAttribute

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Required by 'Comparable' interface, used by TreeSet to sort. When we relied on the "natural order" of this class, the TreeSet sometimes blew chow.

Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException