gov.nasa.pds.tools.dict.type
Interface TypeChecker

All Known Subinterfaces:
NumericTypeChecker
All Known Implementing Classes:
AlphabetChecker, AlphaNumericChecker, CharacterChecker, ContextDependentChecker, DataSetChecker, DateChecker, DoubleChecker, IdentifierChecker, IntegerChecker, NonDecimalChecker, RealChecker, TimeChecker

public interface TypeChecker

Version:
$Revision: 2601 $
Author:
pramirez

Method Summary
 java.lang.Object cast(java.lang.String value)
          Trys to cast the value to the appropriate type and return the value
 void checkMaxLength(java.lang.String value, int max)
          Checks to make sure that the value does not exceed the maximu length
 void checkMinLength(java.lang.String value, int min)
          Checks to make sure that the value does fall below the minimum length length
 

Method Detail

cast

java.lang.Object cast(java.lang.String value)
                      throws InvalidTypeException
Trys to cast the value to the appropriate type and return the value

Parameters:
value - which must be cast
Returns:
value after it has been cast
Throws:
InvalidTypeException - thrown when value can not be cast

checkMinLength

void checkMinLength(java.lang.String value,
                    int min)
                    throws InvalidLengthException
Checks to make sure that the value does fall below the minimum length length

Parameters:
value - to be checked
min - acts as the bound
Throws:
InvalidLengthException - thrown when value falls below minimum

checkMaxLength

void checkMaxLength(java.lang.String value,
                    int max)
                    throws InvalidLengthException
Checks to make sure that the value does not exceed the maximu length

Parameters:
value - to be checked
max - acts as the bound
Throws:
InvalidLengthException - thrown when value exceeds maximum


Copyright © 2005-2008 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.