de.kosi.gui.view.game
Class CardComponentComparator

java.lang.Object
  |
  +--de.kosi.gui.view.game.CardComponentComparator
All Implemented Interfaces:
java.util.Comparator

public class CardComponentComparator
extends java.lang.Object
implements java.util.Comparator

Class for sorting card components. Uses the CCardComparator.


Field Summary
protected  CCardComparator comparator
          The card comparator used by this comparator.
 
Constructor Summary
CardComponentComparator(CCardComparator comparator)
          Creates a comparator which uses the given CCardComparator.
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Returns the order of the two arguments.
 
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
 

Field Detail

comparator

protected CCardComparator comparator
The card comparator used by this comparator.
Constructor Detail

CardComponentComparator

public CardComponentComparator(CCardComparator comparator)
Creates a comparator which uses the given CCardComparator.
Parameters:
comparator - the card comparator used by this comparator.
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Returns the order of the two arguments.
Specified by:
compare in interface java.util.Comparator
Parameters:
obj1 - the first card component.
obj2 - the second card component.
Returns:
the order of the two arguments.