Package | Description |
---|---|
java8.lang |
Provides classes for some of the new static methods that were added in Java 8.
|
java8.util |
Provides some of the new
java.util classes and implementations
of static and default interface methods added in Java 8. |
java8.util.concurrent |
The Java 7 and Java 8 utility classes commonly used in concurrent programming.
|
java8.util.function |
Functional interfaces provide target types for lambda expressions
and method references.
|
java8.util.stream |
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
|
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
Iterables.removeIf(Iterable<? extends T> it,
Predicate<? super T> filter)
Removes all of the elements of the passed
Iterable that satisfy
the given predicate. |
Modifier and Type | Method and Description |
---|---|
Optional<T> |
Optional.filter(Predicate<? super T> predicate)
If a value is present, and the value matches the given predicate,
returns an
Optional describing the value, otherwise returns an
empty Optional . |
Constructor and Description |
---|
ForkJoinPool(int parallelism,
ForkJoinPool.ForkJoinWorkerThreadFactory factory,
Thread.UncaughtExceptionHandler handler,
boolean asyncMode,
int corePoolSize,
int maximumPoolSize,
int minimumRunnable,
Predicate<? super ForkJoinPool> saturate,
long keepAliveTime,
TimeUnit unit)
Creates a
ForkJoinPool with the given parameters. |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
AND of the
this_ predicate and another. |
static <T> Predicate<T> |
Predicates.isEqual(Object targetRef)
Returns a predicate that tests if two arguments are equal according
to
Objects.equals(Object, Object) . |
static <T> Predicate<T> |
Predicates.negate(Predicate<? super T> this_)
Returns a predicate that represents the logical negation of the
this_
predicate. |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
OR of the
this_ predicate and another. |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
AND of the
this_ predicate and another. |
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
AND of the
this_ predicate and another. |
static <T> Predicate<T> |
Predicates.negate(Predicate<? super T> this_)
Returns a predicate that represents the logical negation of the
this_
predicate. |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
OR of the
this_ predicate and another. |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> this_,
Predicate<? super T> other)
Returns a composed predicate that represents a short-circuiting logical
OR of the
this_ predicate and another. |
Modifier and Type | Method and Description |
---|---|
boolean |
Stream.allMatch(Predicate<? super T> predicate)
Returns whether all elements of this stream match the provided predicate.
|
boolean |
Stream.anyMatch(Predicate<? super T> predicate)
Returns whether any elements of this stream match the provided
predicate.
|
Stream<T> |
Stream.dropWhile(Predicate<? super T> predicate)
Returns, if this stream is ordered, a stream consisting of the remaining
elements of this stream after dropping the longest prefix of elements
that match the given predicate.
|
static <T> Stream<T> |
RefStreams.dropWhile(Stream<? extends T> stream,
Predicate<? super T> predicate)
Returns, if the passed stream is ordered, a stream consisting of the remaining
elements of the passed stream after dropping the longest prefix of elements
that match the given predicate.
|
Stream<T> |
Stream.filter(Predicate<? super T> predicate)
Returns a stream consisting of the elements of this stream that match
the given predicate.
|
static <T,A,R> Collector<T,?,R> |
Collectors.filtering(Predicate<? super T> predicate,
Collector<? super T,A,R> downstream)
Adapts a
Collector to one accepting elements of the same type
T by applying the predicate to each input element and only
accumulating if the predicate returns true . |
static <T,S extends T> |
RefStreams.iterate(S seed,
Predicate<S> hasNext,
UnaryOperator<S> next)
Returns a sequential ordered
Stream produced by iterative
application of the given next function to an initial element,
conditioned on satisfying the given hasNext predicate. |
boolean |
Stream.noneMatch(Predicate<? super T> predicate)
Returns whether no elements of this stream match the provided predicate.
|
static <T> Collector<T,?,Map<Boolean,List<T>>> |
Collectors.partitioningBy(Predicate<? super T> predicate)
Returns a
Collector which partitions the input elements according
to a Predicate , and organizes them into a
Map<Boolean, List<T>> . |
static <T,D,A> Collector<T,?,Map<Boolean,D>> |
Collectors.partitioningBy(Predicate<? super T> predicate,
Collector<? super T,A,D> downstream)
Returns a
Collector which partitions the input elements according
to a Predicate , reduces the values in each partition according to
another Collector , and organizes them into a
Map<Boolean, D> whose values are the result of the downstream
reduction. |
Stream<T> |
Stream.takeWhile(Predicate<? super T> predicate)
Returns, if this stream is ordered, a stream consisting of the longest
prefix of elements taken from this stream that match the given predicate.
|
static <T> Stream<T> |
RefStreams.takeWhile(Stream<? extends T> stream,
Predicate<? super T> predicate)
Returns, if the passed stream is ordered, a stream consisting of the longest
prefix of elements taken from the passed stream that match the given predicate.
|
Copyright © 2016. All rights reserved.