Example usage for java.util NavigableSet retainAll

List of usage examples for java.util NavigableSet retainAll

Introduction

In this page you can find the example usage for java.util NavigableSet retainAll.

Prototype

boolean retainAll(Collection<?> c);

Source Link

Document

Retains only the elements in this set that are contained in the specified collection (optional operation).

Usage

From source file:eu.ggnet.dwoss.report.entity.ReportLine.java

/**
 * Calls {@link Collection#retainAll(java.util.Collection) } on a new instance of references and returns the resulting collection.
 * <p>//from   w w w.  ja v  a  2  s. c o  m
 * @param other the other collection to use as parameter on retainAll.
 * @return the resulting collection
 */
public NavigableSet<ReportLine> retainReferences(Collection<ReportLine> other) {
    NavigableSet<ReportLine> result = getRefrences();
    result.retainAll(other);
    return result;
}