gov.loc.repository.bagit.filesystem.filter.OrFileSystemNodeFilter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bagit Show documentation
Show all versions of bagit Show documentation
The BAGIT LIBRARY is a software library intended to support the creation, manipulation, and validation of bags. Its current version is 0.97. It is version aware with the earliest supported version being 0.93.
package gov.loc.repository.bagit.filesystem.filter;
import gov.loc.repository.bagit.filesystem.FileSystemNode;
import gov.loc.repository.bagit.filesystem.FileSystemNodeFilter;
public class OrFileSystemNodeFilter implements FileSystemNodeFilter {
private FileSystemNodeFilter[] filters;
public OrFileSystemNodeFilter(FileSystemNodeFilter... filters) {
this.filters = filters;
}
@Override
public boolean accept(FileSystemNode fileSystemNode) {
for(FileSystemNodeFilter filter : this.filters) {
if (filter.accept(fileSystemNode)){ return true;}
}
return false;
}
}