public Collection fromRealm(String realmName) {
        if (realmPrincipals == null || realmPrincipals.isEmpty()) {
            return Collections.EMPTY_SET;
        }
        Set principals = realmPrincipals.get(realmName);
        if (principals == null || principals.isEmpty()) {
            principals = Collections.EMPTY_SET;
        }
        return Collections.unmodifiableSet(principals);
    }
Returns the first available principal from any of the {@code Realm} principals, or {@code null} if there are
no principals yet.
<p/>
The 'first available principal' is interpreted as the principal that would be returned by
<code>{@link #iterator() iterator()}.{@link java.util.Iterator#next() next()}.</code>

@inheritDoc
core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java