Class Role
java.lang.Object
org.salespointframework.useraccount.Role
- All Implemented Interfaces:
Serializable
,Comparable<Role>
,org.jmolecules.ddd.types.ValueObject
@Embeddable
public final class Role
extends Object
implements Serializable, Comparable<Role>, org.jmolecules.ddd.types.ValueObject
A Role is only identified by a name. This class is immutable.
- Author:
- Christopher Bellmann, Paul Henke
- See Also:
-
Method Summary
-
Method Details
-
of
Creates a newRole
instance with the given name.- Parameters:
name
- the name of the Role, must not be null or empty.- Returns:
- will never be null.
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Role>
-
getName
The name of the role. -
equals
-
hashCode
public int hashCode()
-