|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.fabric.da.types.Cost
public abstract class Cost
Represents the cost of usage (of a particular service). All concrete subclasses of
cost must implement getCostPerMinute()
so that costs can be compared
against threshold values within Dynamic Assembler extensions.
Instances of this type are immutable, and therefore thread-safe.
Costs, while comparable, do not implement meaningful versions of Object.equals(Object)
and Object.hashCode()
. Thus they should not be used as keys of hash-based maps.
Field Summary | |
---|---|
static float |
EPSILON
The precision below which differences in cost per minute are considered negligible. |
Constructor Summary | |
---|---|
Cost()
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
See Comparable.compareTo(Object) . |
abstract float |
getCostPerMinute()
Expresses the cost as a cost-per-minute of subscription. |
java.lang.String |
toString()
Current implementation prints the value of getCostPerMinute() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float EPSILON
Constructor Detail |
---|
public Cost()
Method Detail |
---|
public abstract float getCostPerMinute()
Float.NaN
.)public int compareTo(java.lang.Object obj)
Comparable.compareTo(Object)
.
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
getCostPerMinute()
.
See Object.toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |