All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xbib.interlibrary.common.predicate.DomainPredicate Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy