Example usage for org.apache.commons.collections.list PredicatedList decorate

List of usage examples for org.apache.commons.collections.list PredicatedList decorate

Introduction

In this page you can find the example usage for org.apache.commons.collections.list PredicatedList decorate.

Prototype

public static List decorate(List list, Predicate predicate) 

Source Link

Document

Factory method to create a predicated (validating) list.

Usage

From source file:gov.nih.nci.iso21090.En.java

/**
 * @return the part// www .  j a  va 2  s  . c o  m
 */
@SuppressWarnings("unchecked")
public List<Enxp> getPart() {
    if (part == null) {
        if (partRestriction != null) {
            part = PredicatedList.decorate(partsInternal, partRestriction);
        } else {
            part = partsInternal;
        }
    }
    return part;
}

From source file:org.robotframework.javalib.factory.CompositeKeywordFactory.java

private static List createUniqueListThatDoesntAcceptNullValues() {
    List list = new ArrayList();
    list = SetUniqueList.decorate(list);
    list = PredicatedList.decorate(list, NotNullPredicate.INSTANCE);
    return list;// ww  w. ja va  2s.c om
}