|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectifs.extension.Assignment
public class Assignment
This class describing an assignment of a value to a variable together with a counter (used by CBS). Counter also supports ageing: the counter is multiplied by aging factor for each iteration.
| Nested Class Summary | |
|---|---|
static class |
Assignment.AssignmentComparator
Assignment comparator |
| Constructor Summary | |
|---|---|
Assignment(long iteration,
Value value,
double ageing)
Constructor |
|
| Method Summary | |
|---|---|
static int |
combine(int a,
int b)
Combine two integers (for hash code) |
int |
compareTo(long iteration,
Assignment a)
Compare two assignments (their counters) |
boolean |
equals(Object o)
|
static Comparator |
getComparator(long iteration)
Returns comparator of assignments |
double |
getCounter(long iteration)
Get counter |
Value |
getValue()
Returns value |
int |
hashCode()
|
void |
incCounter(long iteration)
Increments counter |
void |
revise(long iteration)
Revise counter. |
void |
setCounter(double cnt)
Set counter |
String |
toString()
String representation |
String |
toString(long iteration,
boolean assignment)
String representation (e.g., 10x A := a) |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Assignment(long iteration,
Value value,
double ageing)
iteration - current iterationvalue - valueageing - ageing factor| Method Detail |
|---|
public Value getValue()
public void incCounter(long iteration)
iteration - current iterationpublic void setCounter(double cnt)
cnt - new valuepublic double getCounter(long iteration)
iteration - current iterationpublic void revise(long iteration)
public static int combine(int a,
int b)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic static Comparator getComparator(long iteration)
public String toString()
toString in class Object
public String toString(long iteration,
boolean assignment)
public int compareTo(long iteration,
Assignment a)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||