com.oopreserch.web
Class IsInteger
java.lang.Object
|
+--com.oopreserch.web.IsInteger
- All Implemented Interfaces:
- FormValueVerifier
- public class IsInteger
- extends java.lang.Object
- implements FormValueVerifier
Implementation of FormValueVerifier interface.
Returns true if valid as positive int.
This class sees if the given String can be parsed
to positive int or not.
But, even if it can be parsed to positive int,
the String which starts with 0 (zero) will be
treated as invalid.
For example, 010 can be parsed to 10, but
it is invalid for the human beings.
- Author:
- Jun Inamori
|
Method Summary |
boolean |
isValidString(java.lang.String str)
Returns true if the given String is valid as
positive int. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IsInteger
public IsInteger()
isValidString
public boolean isValidString(java.lang.String str)
- Returns true if the given String is valid as
positive int.
- Specified by:
isValidString in interface FormValueVerifier
- Parameters:
str - String to be tested.
- Returns:
- true if the given String is valid as positive
int.
ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.