org.jactr.core.utils
Class ChainedComparator<T>

java.lang.Object
  extended by org.jactr.core.utils.ChainedComparator<T>
All Implemented Interfaces:
java.util.Comparator<T>

public class ChainedComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

Description of the Class

Author:
harrison

Constructor Summary
ChainedComparator(boolean permitEqualities)
          Constructor for the ChainedComparator object
ChainedComparator(java.util.Collection<java.util.Comparator<T>> comps, boolean permitEqualities)
           
ChainedComparator(java.util.Comparator<T> comp, boolean permitEqualities)
           
 
Method Summary
 void add(java.util.Comparator<T> comp)
          Adds a feature to the Comparator attribute of the ChainedComparator object
 int compare(T one, T two)
          Description of the Method
 java.util.List<java.util.Comparator<T>> getComparators()
          Gets the comparators attribute of the ChainedComparator object
 int getNumberOfComparators()
          Deprecated. 
 void remove(java.util.Comparator<T> comp)
          Description of the Method
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ChainedComparator

public ChainedComparator(boolean permitEqualities)
Constructor for the ChainedComparator object


ChainedComparator

public ChainedComparator(java.util.Comparator<T> comp,
                         boolean permitEqualities)
Parameters:
comp -

ChainedComparator

public ChainedComparator(java.util.Collection<java.util.Comparator<T>> comps,
                         boolean permitEqualities)
Method Detail

add

public void add(java.util.Comparator<T> comp)
Adds a feature to the Comparator attribute of the ChainedComparator object

Parameters:
comp - The feature to be added to the Comparator attribute

remove

public void remove(java.util.Comparator<T> comp)
Description of the Method

Parameters:
comp - Description of the Parameter

getNumberOfComparators

@Deprecated
public int getNumberOfComparators()
Deprecated. 


size

public int size()

getComparators

public java.util.List<java.util.Comparator<T>> getComparators()
Gets the comparators attribute of the ChainedComparator object

Returns:
The comparators value

compare

public int compare(T one,
                   T two)
Description of the Method

Specified by:
compare in interface java.util.Comparator<T>
Parameters:
one - Description of the Parameter
two - Description of the Parameter
Returns:
Description of the Return Value