Package org.apache.shiro.web.filter.mgt
Class SimpleNamedFilterList
- java.lang.Object
-
- org.apache.shiro.web.filter.mgt.SimpleNamedFilterList
-
- All Implemented Interfaces:
Iterable<Filter>
,Collection<Filter>
,List<Filter>
,NamedFilterList
public class SimpleNamedFilterList extends Object implements NamedFilterList
SimpleNamedFilterList
implementation that is supported by a backingList
instance and a simplename
property. AllList
method implementations are immediately delegated to the wrapped backing list.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description SimpleNamedFilterList(String name)
Creates a newSimpleNamedFilterList
instance with the specifiedname
, defaulting to a newArrayList
instance as the backing list.SimpleNamedFilterList(String name, List<Filter> backingList)
Creates a newSimpleNamedFilterList
instance with the specifiedname
andbackingList
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, Filter filter)
boolean
add(Filter filter)
boolean
addAll(int index, Collection<? extends Filter> c)
boolean
addAll(Collection<? extends Filter> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
Filter
get(int index)
String
getName()
Returns the configuration-unique name assigned to thisFilter
list.int
indexOf(Object o)
boolean
isEmpty()
Iterator<Filter>
iterator()
int
lastIndexOf(Object o)
ListIterator<Filter>
listIterator()
ListIterator<Filter>
listIterator(int index)
FilterChain
proxy(FilterChain orig)
Returns a newFilterChain
instance that will first execute this list'sFilter
s (in list order) and end with the execution of the givenfilterChain
instance.Filter
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
Filter
set(int index, Filter filter)
protected void
setName(String name)
int
size()
List<Filter>
subList(int fromIndex, int toIndex)
Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
SimpleNamedFilterList
public SimpleNamedFilterList(String name)
Creates a newSimpleNamedFilterList
instance with the specifiedname
, defaulting to a newArrayList
instance as the backing list.- Parameters:
name
- the name to assign to this instance.- Throws:
IllegalArgumentException
- ifname
is null or empty.
-
SimpleNamedFilterList
public SimpleNamedFilterList(String name, List<Filter> backingList)
Creates a newSimpleNamedFilterList
instance with the specifiedname
andbackingList
.- Parameters:
name
- the name to assign to this instance.backingList
- the list instance used to back all of this class'sList
method implementations.- Throws:
IllegalArgumentException
- ifname
is null or empty.NullPointerException
- if the backing list isnull
.
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:NamedFilterList
Returns the configuration-unique name assigned to thisFilter
list.- Specified by:
getName
in interfaceNamedFilterList
- Returns:
- the configuration-unique name assigned to this
Filter
list.
-
proxy
public FilterChain proxy(FilterChain orig)
Description copied from interface:NamedFilterList
Returns a newFilterChain
instance that will first execute this list'sFilter
s (in list order) and end with the execution of the givenfilterChain
instance.- Specified by:
proxy
in interfaceNamedFilterList
- Parameters:
orig
- theFilterChain
instance to execute after this list'sFilter
s have executed.- Returns:
- a new
FilterChain
instance that will first execute this list'sFilter
s (in list order) and end with the execution of the givenfilterChain
instance.
-
addAll
public boolean addAll(Collection<? extends Filter> c)
-
addAll
public boolean addAll(int index, Collection<? extends Filter> c)
-
clear
public void clear()
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<Filter>
- Specified by:
containsAll
in interfaceList<Filter>
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<Filter>
-
listIterator
public ListIterator<Filter> listIterator()
- Specified by:
listIterator
in interfaceList<Filter>
-
listIterator
public ListIterator<Filter> listIterator(int index)
- Specified by:
listIterator
in interfaceList<Filter>
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
-