org.apache.tools.ant.types.selectors.modifiedselector

Class EqualComparator

Implemented Interfaces:
Comparator

public class EqualComparator
extends java.lang.Object
implements 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).

Version:
2003-09-13

Since:
Ant 1.6

Method Summary

int
compare(Object o1, Object o2)
Implements Comparator.compare().
String
toString()
Override Object.toString().

Method Details

compare

public int compare(Object o1,
                   Object o2)
Implements Comparator.compare().

Parameters:
o1 - the first object
o2 - the second object

Returns:
0, if both are equal, otherwise 1


toString

public String toString()
Override Object.toString().

Returns:
information about this comparator


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.