net.sf.myra.gui.util
Class Observation

java.lang.Object
  extended by net.sf.myra.gui.util.Observation
All Implemented Interfaces:
java.lang.Comparable<Observation>

public class Observation
extends java.lang.Object
implements java.lang.Comparable<Observation>

This class represents the result of a configuration on a given instance.

See Also:
Configuration

Constructor Summary
Observation(double value)
          Creates a new Observation.
 
Method Summary
 int compareTo(Observation o)
          Compares this observation's value to the specified observation's value.
 double getRank()
          Returns the rank of this observation.
 double getValue()
          Returns the performance on this observation.
 void setRank(double rank)
          Sets the rank of this observation.
 void setValue(double value)
          Sets the performance on this observation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Observation

public Observation(double value)
Creates a new Observation.

Parameters:
value - the performance achieved by the configuration.
Method Detail

compareTo

public int compareTo(Observation o)
Compares this observation's value to the specified observation's value. The comparison respects a descendent order.

Specified by:
compareTo in interface java.lang.Comparable<Observation>
Parameters:
o - the observation to be compared.
Returns:
0 if both values are equal; negative integer if this observation's value is greater than the specified observation's value ; and positive integer if this configuration's value is less than the specified observation's value.

getRank

public double getRank()
Returns the rank of this observation.

Returns:
the rank of this observation.

setRank

public void setRank(double rank)
Sets the rank of this observation.

Parameters:
rank - the rank to set.

getValue

public double getValue()
Returns the performance on this observation.

Returns:
the performance on this observation.

setValue

public void setValue(double value)
Sets the performance on this observation.

Parameters:
value - the value to set.


Copyright © 2013. All Rights Reserved.