org.apache.tools.ant.types.selectors.modifiedselector
Class HashvalueAlgorithm
java.lang.Object
org.apache.tools.ant.types.selectors.modifiedselector.HashvalueAlgorithm
- Algorithm
public class HashvalueAlgorithm
extends java.lang.Object
Computes a 'hashvalue' for the content of file using String.hashValue().
Use of this algorithm doesn't require any additional nested
s and
doesn't support any.
Version:
- Ant 1.6
String | getValue(File file) - Computes a 'hashvalue' for a file content.
|
boolean | isValid() - This algorithm doesn't need any configuration.
|
String | toString() - Override Object.toString().
|
getValue
public String getValue(File file)
Computes a 'hashvalue' for a file content.
It reads the content of a file, convert that to String and use the
String.hashCode() method.
- getValue in interface Algorithm
file
- The file for which the value should be computed
- the hashvalue or null if the file couldn't be read
isValid
public boolean isValid()
This algorithm doesn't need any configuration.
Therefore it's always valid.
- isValid in interface Algorithm
- always true
toString
public String toString()
Override Object.toString().
- information about this comparator
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.