roast
Class IntegerArgType

java.lang.Object
  |
  +--roast.ArgType
        |
        +--roast.IntegerArgType

public class IntegerArgType
extends roast.ArgType

An IntegerArgType determines whether a given string contains only digits and has a length in a given range.

State variables
maxLength: maximum possible number of digits


Constructor Summary
IntegerArgType(int maxLength0)
          Creates a new instance.
 
Method Summary
 boolean isValid(java.lang.String s)
          Determines whether s is a valid numeric string with a valid length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerArgType

public IntegerArgType(int maxLength0)
Creates a new instance.
Transitions
maxLength = maxLength0
Method Detail

isValid

public boolean isValid(java.lang.String s)
Determines whether s is a valid numeric string with a valid length.
Output
s is a string of numeric characters && |s| in [1..maxLength]