|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.neu.ccs.demeterf.lib.Wrap<X>
public class Wrap<X>
Wrapping class for Sets, so that the elements are not forced to be Comparable.
| Constructor Summary | |
|---|---|
Wrap(X xx)
Create a Wrap from a comparable element |
|
Wrap(X xx,
java.util.Comparator<X> c)
Create a Wrap from an element with a comparator |
|
| Method Summary | |
|---|---|
int |
compareTo(Wrap<X> w)
Implement the Comparable Interface |
boolean |
equals(java.lang.Object o)
Canonical "equals" |
X |
getX()
Getter for Wrap.x |
int |
hashCode()
Canonical HashCode |
java.lang.String |
toString()
Canonical ToString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Wrap(X xx)
public Wrap(X xx,
java.util.Comparator<X> c)
| Method Detail |
|---|
public int compareTo(Wrap<X> w)
compareTo in interface java.lang.Comparable<Wrap<X>>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic X getX()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||