Package org.wildfly.security.authz
Class SimpleAttributesEntry
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<String>
-
- org.wildfly.security.authz.SimpleAttributesEntry
-
- All Implemented Interfaces:
Iterable<String>,Collection<String>,List<String>,Attributes.Entry
public class SimpleAttributesEntry extends AbstractList<String> implements Attributes.Entry
An implementation ofAttributes.Entrywhich can be used by implementations ofAttributes. Operations are implemented in terms of methods onAttributeswhich do not rely upon entries.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description SimpleAttributesEntry(Attributes attributes, String key)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, String element)booleanadd(String s)voidclear()booleancontains(Object o)Stringget(int index)StringgetKey()Get the mapping key.intindexOf(Object o)booleanisEmpty()intlastIndexOf(Object o)Stringremove(int index)booleanremove(Object o)voidremoveRange(int fromIndex, int toIndex)Remove all the values for the given key between thefromindex (inclusive) and thetoindex (exclusive).Stringset(int index, String element)intsize()-
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, iterator, listIterator, listIterator, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.authz.Attributes.Entry
spliterator
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, addAll, containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, replaceAll, retainAll, sort, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
SimpleAttributesEntry
public SimpleAttributesEntry(Attributes attributes, String key)
Construct a new instance.- Parameters:
attributes- the backing attributes collectionkey- the key of this entry
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:Attributes.EntryGet the mapping key.- Specified by:
getKeyin interfaceAttributes.Entry- Returns:
- the mapping key
-
removeRange
public void removeRange(int fromIndex, int toIndex)Description copied from interface:Attributes.EntryRemove all the values for the given key between thefromindex (inclusive) and thetoindex (exclusive).- Specified by:
removeRangein interfaceAttributes.Entry- Overrides:
removeRangein classAbstractList<String>- Parameters:
fromIndex- the start index (inclusive)toIndex- the end index (exclusive)
-
get
public String get(int index)
-
add
public void add(int index, String element)
-
remove
public String remove(int index)
-
add
public boolean add(String s)
- Specified by:
addin interfaceCollection<String>- Specified by:
addin interfaceList<String>- Overrides:
addin classAbstractList<String>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<String>- Specified by:
clearin interfaceList<String>- Overrides:
clearin classAbstractList<String>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<String>- Specified by:
removein interfaceList<String>- Overrides:
removein classAbstractCollection<String>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<String>- Specified by:
containsin interfaceList<String>- Overrides:
containsin classAbstractCollection<String>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<String>- Specified by:
isEmptyin interfaceList<String>- Overrides:
isEmptyin classAbstractCollection<String>
-
indexOf
public int indexOf(Object o)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<String>- Overrides:
lastIndexOfin classAbstractList<String>
-
size
public int size()
- Specified by:
sizein interfaceCollection<String>- Specified by:
sizein interfaceList<String>- Specified by:
sizein classAbstractCollection<String>
-
-