public abstract class NumberRuleAppCost extends java.lang.Object implements RuleAppCost
Modifier and Type | Class and Description |
---|---|
private static class |
NumberRuleAppCost.IntRuleAppCost |
private static class |
NumberRuleAppCost.LongRuleAppCost
Implementation of the
RuleAppCost interface that uses
a long value for the representation of costs, ordered by the
usual ordering of natural numbers. |
Modifier and Type | Field and Description |
---|---|
private static LRUCache<java.lang.Integer,NumberRuleAppCost> |
cache
Requires thread save access as multiple proofs may be performed in parallel (Eclipse).
|
private static NumberRuleAppCost |
ZERO_COST |
Constructor and Description |
---|
NumberRuleAppCost() |
Modifier and Type | Method and Description |
---|---|
RuleAppCost |
add(NumberRuleAppCost cost2) |
RuleAppCost |
add(RuleAppCost cost2)
Add the given costs to the costs that are represented by this object
|
int |
compareTo(NumberRuleAppCost c) |
int |
compareTo(RuleAppCost o) |
static RuleAppCost |
create(int p_cost) |
static RuleAppCost |
create(long p_cost) |
boolean |
equals(java.lang.Object o) |
abstract long |
getValue()
returns the cost
|
static RuleAppCost |
getZeroCost() |
int |
hashCode() |
java.lang.String |
toString() |
private static final NumberRuleAppCost ZERO_COST
private static final LRUCache<java.lang.Integer,NumberRuleAppCost> cache
public static RuleAppCost getZeroCost()
public static RuleAppCost create(int p_cost)
public static RuleAppCost create(long p_cost)
public abstract long getValue()
public int compareTo(RuleAppCost o)
compareTo
in interface RuleAppCost
compareTo
in interface java.lang.Comparable<RuleAppCost>
public int compareTo(NumberRuleAppCost c)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final RuleAppCost add(RuleAppCost cost2)
RuleAppCost
add
in interface RuleAppCost
public final RuleAppCost add(NumberRuleAppCost cost2)
public java.lang.String toString()
toString
in class java.lang.Object