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.Entry
which can be used by implementations ofAttributes
. Operations are implemented in terms of methods onAttributes
which 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 void
add(int index, String element)
boolean
add(String s)
void
clear()
boolean
contains(Object o)
String
get(int index)
String
getKey()
Get the mapping key.int
indexOf(Object o)
boolean
isEmpty()
int
lastIndexOf(Object o)
String
remove(int index)
boolean
remove(Object o)
void
removeRange(int fromIndex, int toIndex)
Remove all the values for the given key between thefrom
index (inclusive) and theto
index (exclusive).String
set(int index, String element)
int
size()
-
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.Entry
Get the mapping key.- Specified by:
getKey
in interfaceAttributes.Entry
- Returns:
- the mapping key
-
removeRange
public void removeRange(int fromIndex, int toIndex)
Description copied from interface:Attributes.Entry
Remove all the values for the given key between thefrom
index (inclusive) and theto
index (exclusive).- Specified by:
removeRange
in interfaceAttributes.Entry
- Overrides:
removeRange
in 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:
add
in interfaceCollection<String>
- Specified by:
add
in interfaceList<String>
- Overrides:
add
in classAbstractList<String>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<String>
- Specified by:
clear
in interfaceList<String>
- Overrides:
clear
in classAbstractList<String>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<String>
- Specified by:
remove
in interfaceList<String>
- Overrides:
remove
in classAbstractCollection<String>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<String>
- Specified by:
contains
in interfaceList<String>
- Overrides:
contains
in classAbstractCollection<String>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<String>
- Specified by:
isEmpty
in interfaceList<String>
- Overrides:
isEmpty
in classAbstractCollection<String>
-
indexOf
public int indexOf(Object o)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<String>
- Overrides:
lastIndexOf
in classAbstractList<String>
-
size
public int size()
- Specified by:
size
in interfaceCollection<String>
- Specified by:
size
in interfaceList<String>
- Specified by:
size
in classAbstractCollection<String>
-
-