Package org.apache.shiro.subject
Interface MutablePrincipalCollection
-
- All Superinterfaces:
Iterable
,PrincipalCollection
,Serializable
- All Known Implementing Classes:
SimplePrincipalCollection
public interface MutablePrincipalCollection extends PrincipalCollection
APrincipalCollection
that allows modification.- Since:
- 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(Object principal, String realmName)
Adds the given principal to this collection.void
addAll(Collection principals, String realmName)
Adds all of the principals in the given collection to this collection.void
addAll(PrincipalCollection principals)
Adds all of the principals from the given principal collection to this collection.void
clear()
Removes all Principals in this collection.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.apache.shiro.subject.PrincipalCollection
asList, asSet, byType, fromRealm, getPrimaryPrincipal, getRealmNames, isEmpty, oneByType
-
-
-
-
Method Detail
-
add
void add(Object principal, String realmName)
Adds the given principal to this collection.- Parameters:
principal
- the principal to be added.realmName
- the realm this principal came from.
-
addAll
void addAll(Collection principals, String realmName)
Adds all of the principals in the given collection to this collection.- Parameters:
principals
- the principals to be added.realmName
- the realm these principals came from.
-
addAll
void addAll(PrincipalCollection principals)
Adds all of the principals from the given principal collection to this collection.- Parameters:
principals
- the principals to add.
-
clear
void clear()
Removes all Principals in this collection.
-
-