Package org.wildfly.security.authz
Class AggregateAttributes
java.lang.Object
org.wildfly.security.authz.AggregateAttributes
- All Implemented Interfaces:
Attributes
An implementation of
Attributes aggregating multiple instances.
Attributes are aggregated on a 'first defined wins' basis, i.e. the first definition of a specific attribute is the one used and remaining definitions are discarded.- Author:
- Darran Lofthouse
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.security.authz.Attributes
Attributes.Entry, Attributes.SetEntry -
Field Summary
Fields inherited from interface org.wildfly.security.authz.Attributes
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributesaggregateOf(Attributes... aggrgatedAttributes) entries()Get the entry collection.Get the collection of values for the given key.Get the mapping for the given key at the given position.intsize()Get the number of keys in this attribute collection.intGet the number of values mapped to the given key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.authz.Attributes
add, addAll, addAll, addFirst, addLast, asReadOnly, clear, containsKey, containsValue, copyAndRemove, copyAndReplace, getFirst, getLast, indexOf, isEmpty, keySet, lastIndexOf, remove, remove, remove, removeAll, removeFirst, removeFirst, removeLast, removeLast, removeRange, set, set, values
-
Method Details
-
aggregateOf
-
entries
Description copied from interface:AttributesGet the entry collection. Changes to the entry collection will modify this attribute collection, if it is writable. The returned entries will remain up to date with the state of this collection.- Specified by:
entriesin interfaceAttributes- Returns:
- the entry collection
-
size
Description copied from interface:AttributesGet the number of values mapped to the given key.- Specified by:
sizein interfaceAttributes- Parameters:
key- the key- Returns:
- the number of mapped values
-
get
Description copied from interface:AttributesGet the collection of values for the given key. The result may implementAttributes.SetEntryif the values are distinct (for example, a role or group set).- Specified by:
getin interfaceAttributes- Parameters:
key- the attribute name- Returns:
- the (possibly empty) attribute value collection
-
get
Description copied from interface:AttributesGet the mapping for the given key at the given position.- Specified by:
getin interfaceAttributes- Parameters:
key- the keyidx- the index- Returns:
- the mapping value
-
size
public int size()Description copied from interface:AttributesGet the number of keys in this attribute collection.- Specified by:
sizein interfaceAttributes- Returns:
- the number of keys
-