Class AttributeCollector
Object
se.curity.identityserver.sdk.attribute.AttributeCollector
- All Implemented Interfaces:
Collector<Attribute,List<Attribute>, Attributes>
public class AttributeCollector
extends Object
implements Collector<Attribute,List<Attribute>,Attributes>
Collector of Attributes.
This class can be used to collect items in a List of Attributes into a single
instance of Attributes.
It may be combined with a AttributeValueCollector to easily create Attributes instances.
For example:
Attributes attributes = Stream.of(
Stream.of(1, "two", 3.0).collect(AttributeValueCollector.toAttribute("attribute_name")),
Stream.of("string1", "string2").collect(AttributeValueCollector.toAttribute("strings")))
.collect(AttributeCollector.toAttributes());
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.stream.Collector
Collector.Characteristics -
Method Summary
Modifier and TypeMethodDescriptioncombiner()finisher()supplier()static AttributeCollectorReturns a new AttributeCollector.
-
Method Details
-
toAttributes
Returns a new AttributeCollector.- Returns:
- a Collector that can be used to collect
Attributeinstances into an instance ofAttributes.
-
supplier
-
accumulator
- Specified by:
accumulatorin interfaceCollector<Attribute,List<Attribute>, Attributes>
-
combiner
-
finisher
-
characteristics
- Specified by:
characteristicsin interfaceCollector<Attribute,List<Attribute>, Attributes>
-