Code example for Principal

Methods: getClass, getName

0
     * Otherwise returns <code>false</code> . 
     */ 
    public boolean implies(Principal another) {
        return (another != null)
                && (WILDCARD.equals(klass) 
                    || klass.equals(another.getClass().getName())
                && (WILDCARD.equals(name) 
                    || (name == null ? another.getName() == null 
                        : name.equals(another.getName()))));
    } 
 
    /**  
     * Returns the hash code value for this object.  
     */ 
    public int hashCode() { 
        int hash = 0;
        if (name != null) {
            hash ^= name.hashCode();
        } 
        if (klass != null) {
            hash ^= klass.hashCode();