org.xbib.interlibrary.common.predicate.DomainPredicate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of interlibrary-common Show documentation
Show all versions of interlibrary-common Show documentation
Interlibrary services in Java for search and availbiity of resources
package org.xbib.interlibrary.common.predicate;
import org.xbib.interlibrary.api.Library;
import java.util.function.Predicate;
/**
*
*/
public class DomainPredicate implements Predicate {
private final String domain;
public DomainPredicate(String domain) {
this.domain = domain;
}
@Override
public boolean test(Library library) {
return domain == null || library.getDomainName() == null || library.getDomainName().equals(domain);
}
}