openfuture.bugbase.model
Class Validators
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 $
- Author:
- Wolfgang Reissenberger
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 |
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, '.', '_', '-', '@'}
- Parameters:
userid
- a value of type 'String'- Returns:
- a value of type 'Result'
isAlphaNumeric
public static final boolean isAlphaNumeric(java.lang.String s)
- Returns true, if s contains only characters from {A, .., z, 0, .., 9}
- Parameters:
s
- string to be checked- Returns:
- true, if s is alpha numeric
isAlphaNumeric
public static final boolean isAlphaNumeric(char c)
- Returns true, if c is from {A, .., z, 0, .., 9}
- Parameters:
c
- character to be checked- Returns:
- true, if c is alpha numeric
isIn
public static final boolean isIn(char x,
char[] chars)
- Returns true, if x is one of the characters from chars.
- Parameters:
x
- value to be checkedchars
- allowed values- Returns:
- (x is in chars)
Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.