dutils.digger.comparators
Class EntriesDefaultComparator
java.lang.Object
|
+--dutils.digger.comparators.Comparator
|
+--dutils.digger.comparators.EntriesDefaultComparator
- public class EntriesDefaultComparator
- extends Comparator
A Comparator
that checks if the searched file or
ZipEntry
String representation matches the search.
This Comparator
discards the full path and uses the specific
entry name for comparison. For example, if the checked entry is:
- Version:
- 1.0
- Author:
- Daniel Or
Method Summary |
boolean |
compare(java.io.File f)
Checks if a given file matches search criteria. |
boolean |
compare(java.io.File f,
java.util.zip.ZipFile zFile,
java.util.zip.ZipEntry zEntry)
Checks if a given ZipEntry matches search criteria. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntriesDefaultComparator
public EntriesDefaultComparator(java.lang.String[] toFind,
java.lang.String[] exclude,
StringTransformation[] transOnSearchedEntry)
- Creates a new EntriesDefaultComparator.
- See Also:
dutils.digger.Comparator#dutils.digger.Comparator(String[], String[], StringTransformation[])
EntriesDefaultComparator
public EntriesDefaultComparator(java.lang.String[] toFind,
java.lang.String[] exclude)
- Creates a new EntriesDefaultComparator.
- See Also:
dutils.digger.Comparator#dutils.digger.Comparator(String[], String[])
compare
public boolean compare(java.io.File f,
java.util.zip.ZipFile zFile,
java.util.zip.ZipEntry zEntry)
- Description copied from class:
Comparator
- Checks if a given
ZipEntry
matches search criteria.
All parameters are required in order to look into the given ZipEntry
.
- Specified by:
compare
in class Comparator
- Parameters:
f
- the actual zip File
.zFile
- a ZipFile
object.zEntry
- a ZipEntry
object.
- Returns:
- true if zEntry metches the search criteria.
compare
public boolean compare(java.io.File f)
- Description copied from class:
Comparator
- Checks if a given file matches search criteria.
- Specified by:
compare
in class Comparator
- Parameters:
f
- a File
tom check.
- Returns:
- true if f metches the search criteria.