|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IComparableProperty
An interface that allows implementors to let themselves be compared by a
Comparable
Number
instance that may be
modified by the comparing classs.
This allows implementation of Set
classes that guarantee to
take every new element by shifting the order of the contained operations with
an operation that modifies their comparable Number
.
Note that the methods getComparableProperty()
and
setComparableProperty(Number)
have to be linked to the same member
or source of data (if more advanced) in a way that:
Number number = <initalisation>; aComparableProperty.setComparableProperty(number); 1) number.equals(aComparableProperty.getComparableProperty()); 2) aComparableProperty.getComparableProperty().equals(number);are both true.
Method Summary | |
---|---|
java.lang.Number |
getComparableProperty()
Returns a Number this instance wants to be compared by. |
void |
setComparableProperty(java.lang.Number n)
Set the comparable Number. |
Method Detail |
---|
java.lang.Number getComparableProperty()
Number
this instance wants to be compared by.
Number
this instance wants to be compared by.void setComparableProperty(java.lang.Number n)
Note that a ComparableProperty
has to allow by contract that
it's Number
property it lays open to be compared by has to
be modifiable from outside!
n
- the comparable number.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |