src/org/tiefaces/common/FacesUtility.java
public static boolean evalInputType(final String input,
			final String type) {

		Scanner scanner = new Scanner(input);
		boolean ireturn = false;
		if ("Integer".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextInt();
		} else if ("Double".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextDouble();
		} else if ("Boolean".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextBoolean();
		} else if ("Byte".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextByte();
		} else if (type.toLowerCase().startsWith("text")) {
			ireturn = true;
		}
		scanner.close();
		return ireturn;
	}
public static boolean evalInputType(final String input,
			final String type) {

		Scanner scanner = new Scanner(input);
		boolean ireturn = false;
		if ("Integer".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextInt();
		} else if ("Double".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextDouble();
		} else if ("Boolean".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextBoolean();
		} else if ("Byte".equalsIgnoreCase(type)) {
			ireturn = scanner.hasNextByte();
		} else if (type.toLowerCase().startsWith("text")) {
			ireturn = true;
		}
		scanner.close();
		return ireturn;
	}
public static boolean evalInputType ( final String input , final String type ) { Scanner scanner = new Scanner ( input ) ; boolean ireturn = false ; if ( "Integer" . equalsIgnoreCase ( type ) ) { ireturn = scanner . hasNextInt ( ) ; } else if ( "Double" . equalsIgnoreCase ( type ) ) { ireturn = scanner . hasNextDouble ( ) ; } else if ( "Boolean" . equalsIgnoreCase ( type ) ) { ireturn = scanner . hasNextBoolean ( ) ; } else if ( "Byte" . equalsIgnoreCase ( type ) ) { ireturn = scanner . hasNextByte ( ) ; } else if ( type . toLowerCase ( ) . startsWith ( "text" ) ) { ireturn = true ; } scanner . close ( ) ; return ireturn ; }
evaluate input type.

@param input
input string.
@param type
input type.
@return true if input meet type, otherwise false.
evaluate input type .