Commit 9493149b authored by Lubomir Bulej's avatar Lubomir Bulej

Predicate: replaced with Predicate from the Java Class Library.

Duration: use the JCL version of the Predicate class.
parent eb15ff4f
......@@ -3,8 +3,7 @@ package ch.usi.dag.util;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import java.util.concurrent.TimeUnit;
import ch.usi.dag.util.function.Predicate;
import java.util.function.Predicate;
/**
......
package ch.usi.dag.util.function;
/**
* Represents a functor which determines whether a given object has a certain
* (implementation specific) property.
* <p>
* A {@link Predicate} functor is typically used to filter elements from an
* iterable container.
*/
public interface Predicate <E> {
/**
* Determines whether the predicate holds for the given element.
*
* @param element
* element to check, may be {@code null}
* @return {@code true} if the element is acceptable by the filter,
* {@code false} otherwise
*/
boolean test (E element);
}
/**
* Provides simple generic functional interfaces to simplify programming in
* functional style. Check the interfaces below for more details.
* <ul>
* <li>{@link Function}
* <li>{@link Predicate}
* <li>{@link Consumer}
* </ul>
* <p>
* <b>Note:</b> The names intentionally reflect the Java 8 terminology to make
* future transitions to Java 8 a bit easier.
*
* @author Lubomir Bulej
*/
package ch.usi.dag.util.function;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment