|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--inonit.domain.game.card.Card.Order
A logical ordering of a set of Card
s.
Constructor Summary | |
protected |
Card.Order()
Constructor used by subclasses. |
Method Summary | |
protected abstract Sort.Action |
compare(Card one,
Card two)
Should return the correct Sort.Action to take when comparing Card s. |
Sort.Action |
compare(java.lang.Object first,
java.lang.Object second)
Implements the Sort.Order.compare method by invoking
this object's compare(Card,Card) method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Card.Order()
Method Detail |
public final Sort.Action compare(java.lang.Object first, java.lang.Object second)
Sort.Order.compare
method by invoking
this object's compare(Card,Card)
method.compare
in interface Sort.Order
inonit.domain.game.card.Sort.Order
first
- an object in the array being sorted.second
- another object in the array being sorted.action
to take when sorting the given objects. If first
should come before
second
in the array,
LEAVE
should be returned. If second
should come before first
,
SWAP
should be returned. If this Order
considers the two objects equal,
EQUAL
should be returned. Must not return null
.protected abstract Sort.Action compare(Card one, Card two)
Sort.Action
to take when comparing Card
s.one
- A Card
to compare.two
- Another Card
to compare.Card
s. See compare(Card,Card)
for details.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |