java.lang.Object
com.aoindustries.aoserv.client.linux.User.Gecos
- All Implemented Interfaces:
DtoFactory<Gecos>
,Internable<User.Gecos>
,Serializable
,Comparable<User.Gecos>
- Enclosing class:
User
public static final class User.Gecos
extends Object
implements Comparable<User.Gecos>, Serializable, DtoFactory<Gecos>, Internable<User.Gecos>
Used for the various user-provided fields in the
/etc/passwd
file.
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(User.Gecos other) boolean
getDto()
int
hashCode()
intern()
Interns this id much in the same fashion asString.intern()
.toString()
static ValidationResult
Determines if a name can be used as a GECOS field.static User.Gecos
-
Field Details
-
MAX_LENGTH
public static final int MAX_LENGTH- See Also:
-
-
Method Details
-
validate
Determines if a name can be used as a GECOS field. A GECOS field is valid if it is between 1 and 100 characters in length and uses only[a-z,A-Z,0-9,-,_,@, ,.,#,=,/,$,%,^,&,*,(,),?,']
for each character.
Refer toman 5 passwd
-
valueOf
- Parameters:
value
- whennull
, returnsnull
- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<User.Gecos>
-
toString
-
intern
Interns this id much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<User.Gecos>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<Gecos>
-