public abstract class NumberRuleAppCost extends 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<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(Object o) |
abstract long |
getValue()
returns the cost
|
static RuleAppCost |
getZeroCost() |
int |
hashCode() |
String |
toString() |
private static final NumberRuleAppCost ZERO_COST
private static final LRUCache<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 Comparable<RuleAppCost>
public int compareTo(NumberRuleAppCost c)
public final RuleAppCost add(RuleAppCost cost2)
RuleAppCost
add
in interface RuleAppCost
public final RuleAppCost add(NumberRuleAppCost cost2)