2Fermer4
Pen^2Le 24/02/2011 à 12:50
Bon, on y voit déjà un peu plus clair.

import java.text.SimpleDateFormat ;


public interface StringUtility
{
   /**
    * Test if the String is empty or null
    * @param input The String to test
    * 
    * @return true if String is empty or null, else false.
    */
   public boolean isEmpty( String input ) ;





   /**
    * Test if the String is a representation of an Integer
    * @param input The String to test
    * 
    * @return true if this is an Integer, else false
    */

   public boolean isInteger( String input ) ;





   /**
    * Test if the String is a representation of a Float value
    * Integer are float.
    *
    * @input The String to test
    *
    * @return true if this is an Integer, else false
    */
   public boolean isNumeric( String input ) ;





   /**
    * Test if the String is a valid representation of a email.
    * @param input The String to test
    *
    * @return true if it's an email.
    */
   public boolean isEmail( String input ) ;





   /**
    * Test if the String is a representation of a boolean.
    * Accepted values are : TRUE, true, FALSE, false, 0, 1
    *
    * @param input The String to test
    *
    * @return true if it is a boolean
    */
   public boolean isBoolean( String input ) ;





   /**
    * Check if the String contains a representation of a Date according
    * to the giving pattern.
    *
    * @see SimpleDateFormat for the possibles patterns.
    * @param pattern the pattern the input must be conform
    * @param input the String to Test
    *
    * @return
    */
   public boolean isDate( String pattern, String input ) ;





   /**
    * Remove SQL for preventing code and data injection in server Side.
    * @param input a Suspicious String.
    *
    * @return a clear String.
    */
   public String removeSQL( String input ) ;





   /**
    * Remove Javascript for preventing code injection in client side.
    * @param input a Suspicious String.
    *
    * @return a clear String.
    */
   public String removeJavascript( String input ) ;





   /**
    * Remove all Xml Tags
    * @param input The String to parse.
    *
    * @return a copy of the String without tags.
    */
   public String removeXmlTags( String input ) ;

   // /** * Remove tags from the same kind.
   // * * @param tag, The kind of tag to remove * @param input The String to
   // parse. * @return a copy of the String without tags. */
   // public String removeXmlTags(String /**
   // * remove accents and special char
   // create a readable ascii string. - Accents letters are binded to
   // (ie é=>e, à=>a ...) - specials chars (spaces, tabs,
   // tag, String input);
   // from a String to their ascii representation ... ) are replaced
   // width the _ symbol. @param input The String to parse.
   // @return the normalized String public String normalize(String input);
}