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 intcompareTo(Role other)booleanequals(Object o)@NonNull StringgetName()The name of the role.inthashCode()static Roleof(String name)Creates a newRoleinstance with the given name.StringtoString()
-
-
-
Method Detail
-
of
public static Role of(String name)
Creates a newRoleinstance 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:
compareToin interfaceComparable<Role>
-
getName
@NonNull public @NonNull String getName()
The name of the role.
-
-