java.lang.Object
openfuture.bugbase.model.Validators
- public class Validators
- extends java.lang.Object
Created: Tue Jun 20 17:20:32 2000
- Version:
- $Revision: 1.3 $
Method Summary |
static boolean |
isAlphaNumeric(char c)
Returns true, if c is from {A, .., z, 0, .., 9} |
static boolean |
isAlphaNumeric(java.lang.String s)
Returns true, if s contains only characters from {A, .., z, 0, .., 9} |
static boolean |
isIn(char x,
char[] chars)
Returns true, if x is one of the characters from chars. |
static Result |
validUserID(java.lang.String userid)
Validate, if userid contains only allowed characters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
userExtraChars
private static final char[] userExtraChars
Validators
public Validators()
validUserID
public static final Result validUserID(java.lang.String userid)
- Validate, if userid contains only allowed characters. Allowed is:
{A - Z, a - z, 0 - 9, '.', '_', '-', '@'}
isAlphaNumeric
public static final boolean isAlphaNumeric(java.lang.String s)
- Returns true, if s contains only characters from {A, .., z, 0, .., 9}
isAlphaNumeric
public static final boolean isAlphaNumeric(char c)
- Returns true, if c is from {A, .., z, 0, .., 9}
isIn
public static final boolean isIn(char x,
char[] chars)
- Returns true, if x is one of the characters from chars.