org.opt4j.core
Class Objective

java.lang.Object
  extended by org.opt4j.core.Objective
All Implemented Interfaces:
java.lang.Comparable<Objective>

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

The Objective is the identifier for a single objective in the Objectives. It is specified by the following properties:

Each Evaluator sets a specific amount of Objective-Value pairs. Moreover, each Evaluator has to set the same Objectives for all phenotypes.

See Also:
Objectives

Nested Class Summary
static class Objective.Sign
          The sign of the Objective.
 
Field Summary
static Value<?> INFEASIBLE
          Identifier for infeasible results (null).
protected  java.lang.String name
           
protected  Objective.Sign sign
           
 
Constructor Summary
Objective(java.lang.String name)
          Constructs an Objective with a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).
Objective(java.lang.String name, Objective.Sign sign)
          Constructs an Objective with a given name, sign, and rank=RANK_OBJECTIVE(0).
 
Method Summary
 int compareTo(Objective other)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Returns the name.
 Objective.Sign getSign()
          Returns the sign.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INFEASIBLE

public static final Value<?> INFEASIBLE
Identifier for infeasible results (null).


sign

protected final Objective.Sign sign

name

protected final java.lang.String name
Constructor Detail

Objective

public Objective(java.lang.String name)
Constructs an Objective with a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).

Parameters:
name - the name

Objective

public Objective(java.lang.String name,
                 Objective.Sign sign)
Constructs an Objective with a given name, sign, and rank=RANK_OBJECTIVE(0).

Parameters:
name - the name
sign - the sign of the objective
Method Detail

getSign

public Objective.Sign getSign()
Returns the sign.

Returns:
the sign

getName

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

Returns:
the name

compareTo

public int compareTo(Objective other)
Specified by:
compareTo in interface java.lang.Comparable<Objective>

toString

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object