Changeset cfcdcb4b


Ignore:
Timestamp:
Mar 12, 2011 5:18:14 PM (8 years ago)
Author:
Ted Faber <faber@…>
Branches:
abac0-leak, abac0-mei, compt_changes, gec13, master, mei-id, mei-rt0-n, mei_rt0, mei_rt2, mei_rt2_fix_1, meiyap-rt1, meiyap1, rt2, tvf-new-xml
Children:
a624bd1
Parents:
622bdbc
Message:

Equality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/net/deterlab/abac/Credential.java

    rf6789db rcfcdcb4b  
    112112
    113113    /**
     114     * Two credentials are the same if their roles are the same.
     115     */
     116    public boolean equals(Object o) {
     117        if ( o instanceof Credential ) {
     118            Credential c = (Credential) o;
     119
     120            if (m_head == null || m_tail == null ) return false;
     121            else return (m_head.equals(c.head()) && m_tail.equals(c.tail()));
     122        }
     123        else return false;
     124    }
     125
     126    /**
    114127     * Get the head role from the credential.
    115128     */
Note: See TracChangeset for help on using the changeset viewer.