gov.nasa.pds.tools.dict.type
Class IntegerChecker

java.lang.Object
  extended by gov.nasa.pds.tools.dict.type.LengthChecker
      extended by gov.nasa.pds.tools.dict.type.IntegerChecker
All Implemented Interfaces:
NumericTypeChecker, TypeChecker

public class IntegerChecker
extends LengthChecker
implements NumericTypeChecker

Version:
$Revision: 5674 $
Author:
pramirez, jagander

Constructor Summary
IntegerChecker()
           
 
Method Summary
 Object cast(String value, AttributeStatement attribute)
          Tries to cast the value to the appropriate type and return the value
 void checkMaxValue(Number value, ElementDefinition def, AttributeStatement attribute)
           
 void checkMinValue(Number value, ElementDefinition def, AttributeStatement attribute)
           
 
Methods inherited from class gov.nasa.pds.tools.dict.type.LengthChecker
checkMaxLength, checkMinLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.pds.tools.dict.type.TypeChecker
checkMaxLength, checkMinLength
 

Constructor Detail

IntegerChecker

public IntegerChecker()
Method Detail

cast

public Object cast(String value,
                   AttributeStatement attribute)
            throws InvalidTypeException
Description copied from interface: TypeChecker
Tries to cast the value to the appropriate type and return the value

Specified by:
cast in interface TypeChecker
Parameters:
value - which must be cast
Returns:
value after it has been cast
Throws:
InvalidTypeException - thrown when value can not be cast

checkMinValue

public void checkMinValue(Number value,
                          ElementDefinition def,
                          AttributeStatement attribute)
                   throws OutOfRangeException
Specified by:
checkMinValue in interface NumericTypeChecker
Throws:
OutOfRangeException

checkMaxValue

public void checkMaxValue(Number value,
                          ElementDefinition def,
                          AttributeStatement attribute)
                   throws OutOfRangeException
Specified by:
checkMaxValue in interface NumericTypeChecker
Throws:
OutOfRangeException


Copyright © 2005-2011 Planetary Data System. All Rights Reserved.