|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.vector.SingleValueComparator
public class SingleValueComparator
This comparator class compares two node objects based on the value
maintained by one of its protocols. The protocol must implement the
SingleValue
interface; its identifier has to be specified when a
new comparator is built.
Constructor Summary | |
---|---|
SingleValueComparator(int pid)
Builds a new comparator that compares the double values maintained by protocol identified by pid . |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares the values of two protocols. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public SingleValueComparator(int pid)
pid
.
Method Detail |
---|
public int compare(java.lang.Object o1, java.lang.Object o2)
Node
. The protocol pid
is accessed on both nodes. These
protocols have to implement the SingleValue
interface. The values
held by these protocol instances are then compared.
compare
in interface java.util.Comparator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |