org.inria.ns.reflex.util
Class NumberConstraint.NumberClassConstraint

java.lang.Object
  extended by org.inria.ns.reflex.util.NumberConstraint.NumberClassConstraint
All Implemented Interfaces:
Constraint, NumberConstraint
Enclosing interface:
NumberConstraint

public abstract static class NumberConstraint.NumberClassConstraint
extends Object
implements NumberConstraint

Base class for checking constraints on number types.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.util.NumberConstraint
NumberConstraint.NumberClassConstraint, NumberConstraint.Type
 
Field Summary
 
Fields inherited from interface org.inria.ns.reflex.util.NumberConstraint
BYTE_CONSTRAINT, DECIMAL_CONSTRAINT, DOUBLE_CONSTRAINT, FLOAT_CONSTRAINT, INT_CONSTRAINT, INTEGER_CONSTRAINT, LONG_CONSTRAINT, MAX_BYTE, MAX_INTEGER, MAX_LONG, MAX_SHORT, MIN_BYTE, MIN_INTEGER, MIN_LONG, MIN_SHORT, NO_CONSTRAINT, SHORT_CONSTRAINT
 
Constructor Summary
NumberConstraint.NumberClassConstraint()
           
 
Method Summary
 boolean checkDigits(StringBuffer buf, Scanner scanner, String min, String max)
           
 boolean checkExponent(Scanner scanner)
           
 boolean checkInteger(Scanner scanner)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.util.NumberConstraint
getNumberType, stopCondition
 

Constructor Detail

NumberConstraint.NumberClassConstraint

public NumberConstraint.NumberClassConstraint()
Method Detail

checkInteger

public boolean checkInteger(Scanner scanner)
                     throws IOException
Throws:
IOException

checkExponent

public boolean checkExponent(Scanner scanner)
                      throws IOException
Throws:
IOException

checkDigits

public boolean checkDigits(StringBuffer buf,
                           Scanner scanner,
                           String min,
                           String max)
                    throws IOException
Parameters:
buf -
scanner -
min - For negative values only. Inclusive.
max - For positive values only. Inclusive.
Returns:
Throws:
IOException