Code example for Function

Methods: apply

0
        this.ignoreNull = ignoreNull;
    } 
 
    @Override 
    public boolean add(E element) {
        element = this.filterAdd.apply(element);
        if (element == null && ignoreNull) {
            return false; 
        } 
        return super.add(element);
    } 
 
    @Override 
    public boolean addAll(Collection<? extends E> collection) {
        boolean modified = false;
        for (final E element : collection) {
            modified = this.add(element) || modified;
        } 
        return modified;
    }