com.sri.emo.wizard
Class ValidValueWithComment

java.lang.Object
  extended by com.jcorporate.expresso.core.dbobj.ValidValue
      extended by com.sri.emo.wizard.ValidValueWithComment
All Implemented Interfaces:
Cacheable, Serializable, Cloneable

public class ValidValueWithComment
extends ValidValue

ValidValueWithComment extends Expresso's idea of a Name/Value pair by being able to add an optional 3rd 'field' which is a comment field. This is often most used in places in emo such as Node Relations where you have the node id, the node label, and the node comment as values.

Version:
1.0
Author:
Michael Rimov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jcorporate.expresso.core.dbobj.ValidValue
ValidValue.DescriptionComparator, ValidValue.ValueComparator
 
Field Summary
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.ValidValue
description, value
 
Constructor Summary
ValidValueWithComment(String newKey, String newDescrip)
          Creates a ValidValueWithComment Without a comment.
ValidValueWithComment(String newKey, String newDescrip, String comment)
          Creates a valid value witha comment attached.
 
Method Summary
 String getComment()
          Retrieve the comment associated with the valid value.
 boolean isSelected()
          Returns true if the valid value is selected.
 void setSelected(boolean selected)
          Sets the valid value as selected.
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.ValidValue
clone, equals, getDescription, getKey, getValue, hashCode, setDescription, setValue, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidValueWithComment

public ValidValueWithComment(String newKey,
                             String newDescrip)
Creates a ValidValueWithComment Without a comment.

Parameters:
newKey - String the key string
newDescrip - String the value string.

ValidValueWithComment

public ValidValueWithComment(String newKey,
                             String newDescrip,
                             String comment)
Creates a valid value witha comment attached.

Parameters:
newKey - String the key of the valid value.
newDescrip - String the label of the valid value.
comment - String the comment attached.
Method Detail

getComment

public String getComment()
Retrieve the comment associated with the valid value.

Returns:
String may be null.

setSelected

public void setSelected(boolean selected)
Sets the valid value as selected.

Parameters:
selected - boolean

isSelected

public boolean isSelected()
Returns true if the valid value is selected.

Returns:
boolean


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.