|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.framework.NumericCost
public class NumericCost
Default numeric cost implementation. Note that this implementation assumes that bigger values are better than smaller values.
Constructor Summary | |
---|---|
NumericCost(double value)
Default constructor. |
Method Summary | |
---|---|
NumericCost |
clone()
Creates and returns a copy of this cost instance. |
int |
compareTo(Cost o)
|
int |
compareTo(NumericCost o)
|
double |
getValue()
Returns the cost value. |
static boolean |
isNumber(double value)
Tests if the specified value is a number. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NumericCost(double value)
value
- the cost value.Method Detail |
---|
public double getValue()
getValue
in interface Cost
public int compareTo(Cost o)
compareTo
in interface java.lang.Comparable<Cost>
public int compareTo(NumericCost o)
public NumericCost clone()
Cost
clone
in interface Cost
clone
in class java.lang.Object
public static boolean isNumber(double value)
value
- the value to be tested.
true
if the value is a number; false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |