EqualComparator (Apache Ant API)
Keywords: org.apache.tools.ant.types.selectors.modifiedselector.EqualComparator class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.types.selectors.modifiedselector
Class EqualComparator

    java.lang.Object
      org.apache.tools.ant.types.selectors.modifiedselector.EqualComparator

All Implemented Interfaces:
  java.util.Comparator

    public class EqualComparator

extends java.lang.Object
implements java.util.Comparator

Simple implementation of Comparator for use in CacheSelector. compare() returns '0' (should not be selected) if both parameter are equal otherwise '1' (should be selected).

Since:
  Ant 1.6
Version:
  2003-09-13

Constructor Summary
`EqualComparator()`

Method Summary
`int` | `compare(java.lang.Object o1, java.lang.Object o2)` Implements Comparator.compare().
`java.lang.String` | `toString()` Override Object.toString().

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Constructor Detail

### EqualComparator

    public EqualComparator()

Method Detail

### compare

    public int compare(java.lang.Object o1,
                       java.lang.Object o2)

  Implements Comparator.compare().

  Specified by:
    `compare` in interface `java.util.Comparator`
  Parameters:
    `o1` - the first object
    `o2` - the second object
  Returns:
    0, if both are equal, otherwise 1

### toString

    public java.lang.String toString()

  Override Object.toString().

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    information about this comparator

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD