Collectors.Filtering(IPredicate, ICollector) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.
[Android.Runtime.Register("filtering", "(Ljava/util/function/Predicate;Ljava/util/stream/Collector;)Ljava/util/stream/Collector;", "", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T", "A", "R" })]
public static Java.Util.Streams.ICollector? Filtering (Java.Util.Functions.IPredicate? predicate, Java.Util.Streams.ICollector? downstream);
[<Android.Runtime.Register("filtering", "(Ljava/util/function/Predicate;Ljava/util/stream/Collector;)Ljava/util/stream/Collector;", "", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T", "A", "R" })>]
static member Filtering : Java.Util.Functions.IPredicate * Java.Util.Streams.ICollector -> Java.Util.Streams.ICollector
Parameters
- predicate
- IPredicate
a predicate to be applied to the input elements
- downstream
- ICollector
a collector which will accept values that match the predicate
Returns
a collector which applies the predicate to the input elements and provides matching elements to the downstream collector
- Attributes
Remarks
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
.
Added in 9.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.