- java.lang.Object
-
- com.aoindustries.aoserv.client.linux.Group.Name
-
- All Implemented Interfaces:
DtoFactory<LinuxGroupName>,Internable<Group.Name>,Serializable,Comparable<Group.Name>
- Enclosing class:
- Group
public static final class Group.Name extends Object implements Comparable<Group.Name>, Serializable, DtoFactory<LinuxGroupName>, Internable<Group.Name>
Represents a group ID that may be used by certain types of groups. Group ids must:- Be non-null
- Be non-empty
- Be between 1 and 32 characters
- Must start with
[a-z] - Uses only ASCII 0x21 through 0x7f, excluding
space , : ( ) [ ] ' " | & ; A-Z \ / @ - TODO: May only end on "$"?
- Author:
- AO Industries, Inc.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Group.Name other)booleanequals(Object O)LinuxGroupNamegetDto()inthashCode()Group.Nameintern()Interns this name much in the same fashion asString.intern().StringtoString()static ValidationResultvalidate(String name)Validates a group name.static Group.NamevalueOf(String name)
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
public static ValidationResult validate(String name)
Validates a group name.
-
valueOf
public static Group.Name valueOf(String name) throws ValidationException
- Parameters:
name- whennull, returnsnull- Throws:
ValidationException
-
compareTo
public int compareTo(Group.Name other)
- Specified by:
compareToin interfaceComparable<Group.Name>
-
intern
public Group.Name intern()
Interns this name much in the same fashion asString.intern().- Specified by:
internin interfaceInternable<Group.Name>- See Also:
String.intern()
-
getDto
public LinuxGroupName getDto()
- Specified by:
getDtoin interfaceDtoFactory<LinuxGroupName>
-
-