edu.iastate.metnet.model
Class DisplayObject

java.lang.Object
  extended by edu.iastate.metnet.model.DisplayObject

public class DisplayObject
extends java.lang.Object

store the pair of display string and value object in the combobox data model

Author:
Jie Li

Field Summary
(package private)  java.lang.Object display
           
(package private) static org.apache.log4j.Logger logger
           
(package private)  java.lang.Object value
           
 
Constructor Summary
DisplayObject()
           
DisplayObject(java.lang.Object display, java.lang.Object value)
           
 
Method Summary
 double difference(java.lang.String anotherValue)
          determine if two display object are equal
 java.lang.Object getDisplay()
           
 java.lang.Object getValue()
          the value of the object
 void setDisplay(java.lang.Object display)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toString()
          the display string of the current object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger

display

java.lang.Object display

value

java.lang.Object value
Constructor Detail

DisplayObject

public DisplayObject(java.lang.Object display,
                     java.lang.Object value)

DisplayObject

public DisplayObject()
Method Detail

toString

public java.lang.String toString()
the display string of the current object

Overrides:
toString in class java.lang.Object
Returns:
the display string of the current object

getValue

public java.lang.Object getValue()
the value of the object

Returns:
the value of the object

difference

public double difference(java.lang.String anotherValue)
determine if two display object are equal

Parameters:
anotherValue - the object value
Returns:
true if equal, false if not

getDisplay

public java.lang.Object getDisplay()
Returns:
Returns the display.

setDisplay

public void setDisplay(java.lang.Object display)
Parameters:
display - The display to set.

setValue

public void setValue(java.lang.Object value)
Parameters:
value - The value to set.