Class ListAttributeValue
Object
se.curity.identityserver.sdk.attribute.ListAttributeValue
- All Implemented Interfaces:
Iterable<AttributeValue>,AttributeOrAttributeValue<AttributeValue>,AttributeValue
An
AttributeValue consisting of multiple AttributeValue instances.-
Method Summary
Modifier and TypeMethodDescriptionappendValue(AttributeValue attributeValue) booleanget(int index) getValue()inthashCode()booleanisEmpty()iterator()map(String path, AttributeOrAttributeValueTransformer transform) Apply the provided transformation on eachAttributeandAttributeValuein this attribute tree, recursively.map(NullableFunction<AttributeValue, AttributeValue> transform) Map over all items in thisListAttributeValue.mapItems(String path, AttributeOrAttributeValueTransformer transform) Maps the items of thisListAttributeValuerecursively.static ListAttributeValueof(Collection<?> value) intsize()stream()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.curity.identityserver.sdk.attribute.AttributeValue
getValueWithAuthoritiesMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
of
-
getValue
- Specified by:
getValuein interfaceAttributeOrAttributeValue<AttributeValue>- Returns:
- a List of values contained in this
ListAttributeValue.Each value is obtained by calling each
AttributeValueitem's getValue() method.The returned List retains no links to this
ListAttributeValue, but no guarantee is made as to whether the List may be modified.
-
getValueWithMetadata
- Specified by:
getValueWithMetadatain interfaceAttributeOrAttributeValue<AttributeValue>- Returns:
- a List of values contained in this
ListAttributeValue, including any metadata associated with each value.The returned List retains no links to this
ListAttributeValue, but no guarantee is made as to whether the List may be modified.
-
getAttributeValues
- Returns:
- an unmodifiable List of
AttributeValues contained in thisListAttributeValue.
-
iterator
- Specified by:
iteratorin interfaceIterable<AttributeValue>
-
stream
-
size
public int size() -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceAttributeValue- Returns:
- true if this AttributeValue is semantically empty, ie. has no value.
-
appendValue
-
get
- Parameters:
index- of the element- Returns:
- the element at the given index, or null if
index >= size().
-
map
Map over all items in thisListAttributeValue.- Parameters:
transform- to apply on each item. If null is returned, the respective item is removed from the returned list.- Returns:
- transformed list.
-
map
@Nullable public @Nullable AttributeValue map(String path, AttributeOrAttributeValueTransformer transform) Description copied from interface:AttributeOrAttributeValueApply the provided transformation on eachAttributeandAttributeValuein this attribute tree, recursively.- Specified by:
mapin interfaceAttributeOrAttributeValue<AttributeValue>- Specified by:
mapin interfaceAttributeValue- Parameters:
path- of the current attribute or value being transformed.transform- transformation function.- Returns:
- the transformed attribute or value
-
mapItems
Maps the items of thisListAttributeValuerecursively.This method is similar to the
map(String, AttributeOrAttributeValueTransformer)method, but it may not be used to transform the List itself, hence it always return a non-nullListAttributeValue.- Parameters:
path- root pathtransform- transformation function- Returns:
- the transformed List
-
toString
-
equals
-
hashCode
public int hashCode()
-