Code example for Principal

Methods: getName

0
   { 
      if (obj instanceof Principal)
      { 
         Principal other = (Principal) obj;
         return name == null ?
                  other.getName() == null :
                  name.equals( other.getName() );
      } 
      else 
      { 
         return false; 
      } 
   } 
 
   @Override 
   public int hashCode() 
   { 
      return name != null ? name.hashCode() : super.hashCode();
   } 
 
   @Override