OOP FormGenerator Version 3.1

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

Constructor Summary
IsInteger()
           
 
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
 

Constructor Detail

IsInteger

public IsInteger()
Method Detail

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.

OOP FormGenerator Version 3.1

ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.