Package org.glassfish.security.common
Class Group
- java.lang.Object
-
- org.glassfish.security.common.PrincipalImpl
-
- org.glassfish.security.common.Group
-
- All Implemented Interfaces:
Serializable,Principal
public class Group extends PrincipalImpl
This class implements the EJB concept of a Group. A Group is a privilege attribute that several Principals share. Or, in in other words, several Principals belong to a same group.Two Group instances are equal if they have the same name.
- Author:
- Harish Prabandham
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)This function returns true if the object passed matches the principal represented in this implementationinthashCode()Returns the hashcode for this Principal object-
Methods inherited from class org.glassfish.security.common.PrincipalImpl
getName, toString
-
-
-
-
Constructor Detail
-
Group
public Group(String name)
- Parameters:
name- - a name of the group
-
-
Method Detail
-
equals
public boolean equals(Object other)
Description copied from class:PrincipalImplThis function returns true if the object passed matches the principal represented in this implementation- Specified by:
equalsin interfacePrincipal- Overrides:
equalsin classPrincipalImpl- Parameters:
other- the Principal to compare with.- Returns:
- true if the Principal passed is the same as that encapsulated in this object, false otherwise
-
hashCode
public int hashCode()
Description copied from class:PrincipalImplReturns the hashcode for this Principal object- Specified by:
hashCodein interfacePrincipal- Overrides:
hashCodein classPrincipalImpl- Returns:
- a hashcode for the principal.
-
-