Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.bugbase.model
Class Validators  view Validators download Validators.java

java.lang.Object
  extended byopenfuture.bugbase.model.Validators

public class Validators
extends java.lang.Object

Created: Tue Jun 20 17:20:32 2000

Version:
$Revision: 1.3 $

Field Summary
private static char[] userExtraChars
           
 
Constructor Summary
Validators()
           
 
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
 

Field Detail

userExtraChars

private static final char[] userExtraChars
Constructor Detail

Validators

public Validators()
Method Detail

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.