inonit.domain.game.card
Interface Sort.Order

All Known Implementing Classes:
Card.Order
Enclosing class:
Sort

public static interface Sort.Order

A logical ordering for a set of objects.


Method Summary
 Sort.Action compare(java.lang.Object first, java.lang.Object second)
          Returns a Sort.Action corresponding to this Order given the two objects.
 

Method Detail

compare

public Sort.Action compare(java.lang.Object first,
                           java.lang.Object second)
Returns a Sort.Action corresponding to this Order given the two objects.
Parameters:
first - an object in the array being sorted.
second - another object in the array being sorted.
Returns:
An 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.