net.sf.myra.gui.util
Class Configuration

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

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

This class represents a candidate configuration undergoing the F-Race.


Constructor Summary
Configuration(java.lang.String name)
          Creates a new Configuration.
 
Method Summary
 void add(java.lang.String name, Observation observation)
          Adds an observation to this configuration.
 int compareTo(Configuration o)
          Compares this configuration against the specified configuration.
 java.lang.String getName()
          Returns the configuration name.
 Observation getObservation(java.lang.String name)
          Returns the obsservation associated with the specified name.
 double getRank()
          Returns the value of the accumulated rank of this configuration.
 void setRank(double rank)
          Sets the accumulated rank of this configuration over the instances used in the current step of the race.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(java.lang.String name)
Creates a new Configuration.

Parameters:
name - the configuration name.
Method Detail

getName

public java.lang.String getName()
Returns the configuration name.

Returns:
the configuration name.

add

public void add(java.lang.String name,
                Observation observation)
Adds an observation to this configuration.

Parameters:
name - the name of the observation, which usually correspond to the name of the instances (test).
observation - the observation to add.

getObservation

public Observation getObservation(java.lang.String name)
Returns the obsservation associated with the specified name.

Parameters:
name - the name of the observation.
Returns:
the obsservation associated with the specified name.

getRank

public double getRank()
Returns the value of the accumulated rank of this configuration.

Returns:
the value of the accumulated rank of this configuration.

setRank

public void setRank(double rank)
Sets the accumulated rank of this configuration over the instances used in the current step of the race.

Parameters:
rank - the rank to set.

compareTo

public int compareTo(Configuration o)
Compares this configuration against the specified configuration.

Specified by:
compareTo in interface java.lang.Comparable<Configuration>
Returns:
0 if both configuration have the same accumulated rank; a negative integer if this configuration has a higher (worse) rank; a positive integer if this configuration has a lower (better) rank.


Copyright © 2013. All Rights Reserved.