Tak jsem si to vsechno vyzkousel,
a implementace by mela tim padem vypadat asi takhle:
 
class CustomPermission
{
 
public CustomPermission ( String name )
{
 
    super ( name );
 
}
 
...
 
public int hashCode ()
{
 
    return this.getName ().hashCode ();
 
}
 
public boolean equals ( Object object )
{
 
    if ( object instanceof CustomPermission )
    {
 
        CustomPermission cp = (CustomPermission) object;       
        if ( ( cp.getName == this.getName () ) && cp.getActions () == this.getActions ()  )
            return true;
 
 
    }
    return false;
 
}
 
}
 
nemam tam nejakou salamounskou chybu?

Odpovedet emailem