/** * Checks to see if the File should be accepted by this filter. * * @param dir the directory File to check * @param name the filename within the directory to check * @return true if this file matches the test */ @Override public boolean accept(final File dir, final String name) { return accept(new File(dir, name)); }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final String condition = acceptOlder ? "<=" : ">"; return super.toString() + "(" + condition + cutoff + ")"; } }
/** * Checks the filter. * * @param file the file to check * @return true if the filter matches */ @Override public boolean accept(final File file) { if (fileFilter != null) { return fileFilter.accept(file); } else { return super.accept(file); } }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final String condition = acceptLarger ? ">=" : "<"; return super.toString() + "(" + condition + size + ")"; }
/** * Checks the filter. * * @param dir the directory * @param name the filename in the directory * @return true if the filter matches */ @Override public boolean accept(final File dir, final String name) { if (filenameFilter != null) { return filenameFilter.accept(dir, name); } else { return super.accept(dir, name); } }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { return super.toString() + "(" + filter.toString() + ")"; }
/** * Checks to see if the File should be accepted by this filter. * * @param file the File to check * @return true if this file matches the test */ @Override public boolean accept(final File file) { return accept(file.getParentFile(), file.getName()); }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final String delegate = fileFilter != null ? fileFilter.toString() : filenameFilter.toString(); return super.toString() + "(" + delegate + ")"; }
/** * Checks to see if the File should be accepted by this filter. * * @param dir the directory File to check * @param name the filename within the directory to check * @return true if this file matches the test */ public boolean accept(File dir, String name) { return accept(new File(dir, name)); }
/** * Returns a String representation of the file filter, which includes the * magic number bytes and byte offset. * * @return a String representation of the file filter. */ @Override public String toString() { final StringBuilder builder = new StringBuilder(super.toString()); builder.append("("); builder.append(new String(magicNumbers, Charset.defaultCharset()));// TODO perhaps use hex if value is not // printable builder.append(","); builder.append(this.byteOffset); builder.append(")"); return builder.toString(); } }
/** * Checks the filter. * * @param file the file to check * @return true if the filter matches */ public boolean accept(File file) { if (fileFilter != null) { return fileFilter.accept(file); } else { return super.accept(file); } }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append(super.toString()); buffer.append("("); if (prefixes != null) { for (int i = 0; i < prefixes.length; i++) { if (i > 0) { buffer.append(","); } buffer.append(prefixes[i]); } } buffer.append(")"); return buffer.toString(); }
/** * Checks the filter. * * @param dir the directory * @param name the filename in the directory * @return true if the filter matches */ public boolean accept(File dir, String name) { if (filenameFilter != null) { return filenameFilter.accept(dir, name); } else { return super.accept(dir, name); } }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append(super.toString()); buffer.append("("); if (wildcards != null) { for (int i = 0; i < wildcards.length; i++) { if (i > 0) { buffer.append(","); } buffer.append(wildcards[i]); } } buffer.append(")"); return buffer.toString(); }
/** * Checks to see if the File should be accepted by this filter. * * @param file the File to check * @return true if this file matches the test */ public boolean accept(File file) { return accept(file.getParentFile(), file.getName()); }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append(super.toString()); buffer.append("("); if (names != null) { for (int i = 0; i < names.length; i++) { if (i > 0) { buffer.append(","); } buffer.append(names[i]); } } buffer.append(")"); return buffer.toString(); }
/** * Checks to see if the File should be accepted by this filter. * * @param dir the directory File to check * @param name the filename within the directory to check * @return true if this file matches the test */ public boolean accept(File dir, String name) { return accept(new File(dir, name)); }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append(super.toString()); buffer.append("("); if (suffixes != null) { for (int i = 0; i < suffixes.length; i++) { if (i > 0) { buffer.append(","); } buffer.append(suffixes[i]); } } buffer.append(")"); return buffer.toString(); }
/** * Checks to see if the File should be accepted by this filter. * * @param dir the directory File to check * @param name the filename within the directory to check * @return true if this file matches the test */ public boolean accept(File dir, String name) { return accept(new File(dir, name)); }
/** * Provide a String representation of this file filter. * * @return a String representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append(super.toString()); buffer.append("("); if (fileFilters != null) { for (int i = 0; i < fileFilters.size(); i++) { if (i > 0) { buffer.append(","); } final Object filter = fileFilters.get(i); buffer.append(filter == null ? "null" : filter.toString()); } } buffer.append(")"); return buffer.toString(); }