org.jscience.computing.ai.planning
Class CompMore

java.lang.Object
  extended by org.jscience.computing.ai.planning.CompMore
All Implemented Interfaces:
java.util.Comparator

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

This class handles :sort-by logical preconditions that use numerical more than as the sorting function.


Constructor Summary
CompMore(int varIdxIn)
          To initialize this object.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          The function that implements the actual comparison.
 
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
 

Constructor Detail

CompMore

public CompMore(int varIdxIn)
To initialize this object.

Parameters:
varIdxIn - The index of the variable according to the value of which the satisfiers should be sorted.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
The function that implements the actual comparison.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - the first binding.
o2 - the second binding.
Returns:
-1 if the first binding should come first, 1 if the second binding should come first, 0 if the variable according to value of which the satisfiers are being sorted has the same value in these two bindings.