Example usage for com.google.common.collect Multisets filter

List of usage examples for com.google.common.collect Multisets filter

Introduction

In this page you can find the example usage for com.google.common.collect Multisets filter.

Prototype

@Beta
@CheckReturnValue
public static <E> Multiset<E> filter(Multiset<E> unfiltered, Predicate<? super E> predicate) 

Source Link

Document

Returns a view of the elements of unfiltered that satisfy a predicate.

Usage

From source file:org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL2.java

private Multiset<OWLClass> filterByNamespace(Multiset<OWLClass> classes) {
    if (namespace != null) {
        return Multisets.filter(classes, input -> input.toStringID().startsWith(namespace));
    }/*from   ww  w .jav a  2 s.c  om*/
    return classes;
}