Class Role
- java.lang.Object
-
- org.salespointframework.useraccount.Role
-
- All Implemented Interfaces:
Serializable
,Comparable<Role>
@Embeddable public final class Role extends Object implements Serializable, Comparable<Role>
A Role is only identified by a name. This class is immutable.- Author:
- Christopher Bellmann, Paul Henke
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Role other)
boolean
equals(Object o)
@NonNull String
getName()
The name of the role.int
hashCode()
static Role
of(String name)
Creates a newRole
instance with the given name.String
toString()
-
-
-
Method Detail
-
of
public static Role of(String name)
Creates a newRole
instance with the given name.- Parameters:
name
- the name of the Role, must not be null or empty.
-
compareTo
public final int compareTo(Role other)
- Specified by:
compareTo
in interfaceComparable<Role>
-
getName
@NonNull public @NonNull String getName()
The name of the role.
-
-