blob: 517369dccdf8d358bcd1bbeab870f76f0ff512fb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_21) on Thu May 30 15:02:19 PDT 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>SimplePrincipalCollection (Apache Shiro 1.2.2 API)</title>
<meta name="date" content="2013-05-30">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SimplePrincipalCollection (Apache Shiro 1.2.2 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimplePrincipalCollection.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/shiro/subject/PrincipalMap.html" title="interface in org.apache.shiro.subject"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/shiro/subject/SimplePrincipalMap.html" title="class in org.apache.shiro.subject"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/shiro/subject/SimplePrincipalCollection.html" target="_top">Frames</a></li>
<li><a href="SimplePrincipalCollection.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.shiro.subject</div>
<h2 title="Class SimplePrincipalCollection" class="title">Class SimplePrincipalCollection</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.shiro.subject.SimplePrincipalCollection</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>, <a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a>, <a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></dd>
</dl>
<hr>
<br>
<pre>public class <a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.37">SimplePrincipalCollection</a>
extends <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a></pre>
<div class="block">A simple implementation of the <a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject"><code>MutablePrincipalCollection</code></a> interface that tracks principals internally
by storing them in a <a href="http://java.sun.com/javase/6/docs/api/java/util/LinkedHashMap.html?is-external=true" title="class or interface in java.util"><code>LinkedHashMap</code></a>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>0.9</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#org.apache.shiro.subject.SimplePrincipalCollection">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#SimplePrincipalCollection()">SimplePrincipalCollection</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#SimplePrincipalCollection(java.util.Collection, java.lang.String)">SimplePrincipalCollection</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;principals,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#SimplePrincipalCollection(java.lang.Object, java.lang.String)">SimplePrincipalCollection</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;principal,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#SimplePrincipalCollection(org.apache.shiro.subject.PrincipalCollection)">SimplePrincipalCollection</a></strong>(<a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#add(java.lang.Object, java.lang.String)">add</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;principal,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>
<div class="block">Adds the given principal to this collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#addAll(java.util.Collection, java.lang.String)">addAll</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;principals,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>
<div class="block">Adds all of the principals in the given collection to this collection.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#addAll(org.apache.shiro.subject.PrincipalCollection)">addAll</a></strong>(<a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</code>
<div class="block">Adds all of the principals from the given principal collection to this collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#asList()">asList</a></strong>()</code>
<div class="block">Returns a single Subject's principals retrieved from all configured Realms as a List, or an empty List if
there are not any principals.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#asSet()">asSet</a></strong>()</code>
<div class="block">Returns a single Subject's principals retrieved from all configured Realms as a Set, or an empty Set if there
are not any principals.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#byType(java.lang.Class)">byType</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;type)</code>
<div class="block">Returns all principals assignable from the specified type, or an empty Collection if no principals of that
type are contained.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#clear()">clear</a></strong>()</code>
<div class="block">Removes all Principals in this collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#fromRealm(java.lang.String)">fromRealm</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>
<div class="block">Returns a single Subject's principals retrieved from the specified Realm <em>only</em> as a Collection, or an empty
Collection if there are not any principals from that realm.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#getPrimaryPrincipal()">getPrimaryPrincipal</a></strong>()</code>
<div class="block">Returns the first available principal from any of the <code>Realm</code> principals, or <code>null</code> if there are
no principals yet.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#getPrincipalsLazy(java.lang.String)">getPrincipalsLazy</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#getRealmNames()">getRealmNames</a></strong>()</code>
<div class="block">Returns the realm names that this collection has principals for.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#hashCode()">hashCode</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#isEmpty()">isEmpty</a></strong>()</code>
<div class="block">Returns <code>true</code> if this collection is empty, <code>false</code> otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#iterator()">iterator</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#oneByType(java.lang.Class)">oneByType</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;type)</code>
<div class="block">Returns the first discovered principal assignable from the specified type, or <code>null</code> if there are none
of the specified type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#toString()">toString</a></strong>()</code>
<div class="block">Returns a simple string representation suitable for printing.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SimplePrincipalCollection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplePrincipalCollection</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.52">SimplePrincipalCollection</a>()</pre>
</li>
</ul>
<a name="SimplePrincipalCollection(java.lang.Object, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplePrincipalCollection</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.55">SimplePrincipalCollection</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;principal,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
</li>
</ul>
<a name="SimplePrincipalCollection(java.util.Collection, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplePrincipalCollection</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.63">SimplePrincipalCollection</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;principals,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
</li>
</ul>
<a name="SimplePrincipalCollection(org.apache.shiro.subject.PrincipalCollection)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SimplePrincipalCollection</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.67">SimplePrincipalCollection</a>(<a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getPrincipalsLazy(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrincipalsLazy</h4>
<pre>protected&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.71">getPrincipalsLazy</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
</li>
</ul>
<a name="getPrimaryPrincipal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimaryPrincipal</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.92">getPrimaryPrincipal</a>()</pre>
<div class="block">Returns the first available principal from any of the <code>Realm</code> principals, or <code>null</code> if there are
no principals yet.
<p/>
The 'first available principal' is interpreted as the principal that would be returned by
<code><a href="../../../../org/apache/shiro/subject/SimplePrincipalCollection.html#iterator()"><code>iterator()</code></a>.<a href="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true#next()" title="class or interface in java.util"><code>next()</code></a>.</code></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#getPrimaryPrincipal()">getPrimaryPrincipal</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the primary principal used to uniquely identify the owning account/Subject</dd></dl>
</li>
</ul>
<a name="add(java.lang.Object, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.99">add</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;principal,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#add(java.lang.Object, java.lang.String)">MutablePrincipalCollection</a></code></strong></div>
<div class="block">Adds the given principal to this collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#add(java.lang.Object, java.lang.String)">add</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>principal</code> - the principal to be added.</dd><dd><code>realmName</code> - the realm this principal came from.</dd></dl>
</li>
</ul>
<a name="addAll(java.util.Collection, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAll</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.110">addAll</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;principals,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#addAll(java.util.Collection, java.lang.String)">MutablePrincipalCollection</a></code></strong></div>
<div class="block">Adds all of the principals in the given collection to this collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#addAll(java.util.Collection, java.lang.String)">addAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>principals</code> - the principals to be added.</dd><dd><code>realmName</code> - the realm these principals came from.</dd></dl>
</li>
</ul>
<a name="addAll(org.apache.shiro.subject.PrincipalCollection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAll</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.124">addAll</a>(<a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#addAll(org.apache.shiro.subject.PrincipalCollection)">MutablePrincipalCollection</a></code></strong></div>
<div class="block">Adds all of the principals from the given principal collection to this collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#addAll(org.apache.shiro.subject.PrincipalCollection)">addAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>principals</code> - the principals to add.</dd></dl>
</li>
</ul>
<a name="oneByType(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>oneByType</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.134">oneByType</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;type)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#oneByType(java.lang.Class)">PrincipalCollection</a></code></strong></div>
<div class="block">Returns the first discovered principal assignable from the specified type, or <code>null</code> if there are none
of the specified type.
<p/>
Note that this will return <code>null</code> if the 'owning' subject has not yet logged in.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#oneByType(java.lang.Class)">oneByType</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - the type of the principal that should be returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a principal of the specified type or <code>null</code> if there isn't one of the specified type.</dd></dl>
</li>
</ul>
<a name="byType(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>byType</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;T&gt;&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.149">byType</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;type)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#byType(java.lang.Class)">PrincipalCollection</a></code></strong></div>
<div class="block">Returns all principals assignable from the specified type, or an empty Collection if no principals of that
type are contained.
<p/>
Note that this will return an empty Collection if the 'owning' subject has not yet logged in.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#byType(java.lang.Class)">byType</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - the type of the principals that should be returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a Collection of principals that are assignable from the specified type, or
an empty Collection if no principals of this type are associated.</dd></dl>
</li>
</ul>
<a name="asList()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asList</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.168">asList</a>()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#asList()">PrincipalCollection</a></code></strong></div>
<div class="block">Returns a single Subject's principals retrieved from all configured Realms as a List, or an empty List if
there are not any principals.
<p/>
Note that this will return an empty List if the 'owning' subject has not yet logged in.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#asList()">asList</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a single Subject's principals retrieved from all configured Realms as a List.</dd></dl>
</li>
</ul>
<a name="asSet()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asSet</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.176">asSet</a>()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#asSet()">PrincipalCollection</a></code></strong></div>
<div class="block">Returns a single Subject's principals retrieved from all configured Realms as a Set, or an empty Set if there
are not any principals.
<p/>
Note that this will return an empty Set if the 'owning' subject has not yet logged in.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#asSet()">asSet</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a single Subject's principals retrieved from all configured Realms as a Set.</dd></dl>
</li>
</ul>
<a name="fromRealm(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromRealm</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.191">fromRealm</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;realmName)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#fromRealm(java.lang.String)">PrincipalCollection</a></code></strong></div>
<div class="block">Returns a single Subject's principals retrieved from the specified Realm <em>only</em> as a Collection, or an empty
Collection if there are not any principals from that realm.
<p/>
Note that this will return an empty Collection if the 'owning' subject has not yet logged in.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#fromRealm(java.lang.String)">fromRealm</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>realmName</code> - the name of the Realm from which the principals were retrieved.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the Subject's principals from the specified Realm only as a Collection or an empty Collection if there
are not any principals from that realm.</dd></dl>
</li>
</ul>
<a name="getRealmNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRealmNames</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.202">getRealmNames</a>()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#getRealmNames()">PrincipalCollection</a></code></strong></div>
<div class="block">Returns the realm names that this collection has principals for.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#getRealmNames()">getRealmNames</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the names of realms that this collection has one or more principals for.</dd></dl>
</li>
</ul>
<a name="isEmpty()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.210">isEmpty</a>()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#isEmpty()">PrincipalCollection</a></code></strong></div>
<div class="block">Returns <code>true</code> if this collection is empty, <code>false</code> otherwise.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html#isEmpty()">isEmpty</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this collection is empty, <code>false</code> otherwise.</dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.214">clear</a>()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#clear()">MutablePrincipalCollection</a></code></strong></div>
<div class="block">Removes all Principals in this collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html#clear()">clear</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/shiro/subject/MutablePrincipalCollection.html" title="interface in org.apache.shiro.subject">MutablePrincipalCollection</a></code></dd>
</dl>
</li>
</ul>
<a name="iterator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.222">iterator</a>()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a></code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.226">equals</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.237">hashCode</a>()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/subject/SimplePrincipalCollection.html#line.250">toString</a>()</pre>
<div class="block">Returns a simple string representation suitable for printing.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a simple string representation suitable for printing.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.0</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimplePrincipalCollection.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/shiro/subject/PrincipalMap.html" title="interface in org.apache.shiro.subject"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/shiro/subject/SimplePrincipalMap.html" title="class in org.apache.shiro.subject"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/shiro/subject/SimplePrincipalCollection.html" target="_top">Frames</a></li>
<li><a href="SimplePrincipalCollection.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2004-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>