- 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/passwdfile.- 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(User.Gecos other)booleanequals(Object O)GecosgetDto()inthashCode()User.Gecosintern()Interns this id much in the same fashion asString.intern().StringtoString()static ValidationResultvalidate(String value)Determines if a name can be used as a GECOS field.static User.GecosvalueOf(String value)
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
public static ValidationResult validate(String value)
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
public static User.Gecos valueOf(String value) throws ValidationException
- Parameters:
value- whennull, returnsnull- Throws:
ValidationException
-
compareTo
public int compareTo(User.Gecos other)
- Specified by:
compareToin interfaceComparable<User.Gecos>
-
intern
public User.Gecos intern()
Interns this id much in the same fashion asString.intern().- Specified by:
internin interfaceInternable<User.Gecos>- See Also:
String.intern()
-
getDto
public Gecos getDto()
- Specified by:
getDtoin interfaceDtoFactory<Gecos>
-
-