fdda.propertyTypes.implementations
Class IntegerGenerator

java.lang.Object
  |
  +--fdda.propertyTypes.AbstractGenerator
        |
        +--fdda.propertyTypes.implementations.IntegerGenerator
All Implemented Interfaces:
TypeGenerator

public class IntegerGenerator
extends AbstractGenerator

Generator for Integer values.

Author:
Jörg Rüdenauer

Field Summary
 
Fields inherited from class fdda.propertyTypes.AbstractGenerator
correctValueRetCode
 
Fields inherited from interface fdda.propertyTypes.TypeGenerator
FACET_DEFAULT_IS_GREATER_THAN_MAX, FACET_DEFAULT_IS_LOWER_THAN_MIN, FACET_DEFAULT_NOT_ALLOWED, FACET_MIN_IS_GREATER_THAN_MAX, FACET_OF_WRONG_TYPE, VALUE_SET_TO_CLASS_DEFAULT, VALUE_SET_TO_MAX, VALUE_SET_TO_MIN, VALUE_SET_TO_USER_DEFAULT, WELL_DONE, WRONG_CLASS_OBJECT
 
Constructor Summary
IntegerGenerator()
          Default constructor.
 
Method Summary
 Object cloneValue(Object valueObject)
          Returns a 'deep' copy of a value.
 int correctFacets(Property property)
          Checks whether the facets of a property fit to the type and corrects them, if necessary.
 Object correctValue(Object inValue, Property property)
          Corrects a value of a property so that it fits to the type and facets.
 Object parseString(String string)
          Returns a value parsed from a String representation.
 
Methods inherited from class fdda.propertyTypes.AbstractGenerator
describeAction, getlastCorrectAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerGenerator

public IntegerGenerator()
Default constructor.

Method Detail

cloneValue

public Object cloneValue(Object valueObject)
Description copied from interface: TypeGenerator
Returns a 'deep' copy of a value.

Parameters:
valueObject - the value
Returns:
a copy of the value

parseString

public Object parseString(String string)
                   throws ParseException
Description copied from interface: TypeGenerator
Returns a value parsed from a String representation.

Parameters:
string - the representation of the value
Returns:
the parsed value
Throws:
ParseException - if the String doesn't represent a value of the type

correctValue

public Object correctValue(Object inValue,
                           Property property)
                    throws WrongFacetException
Description copied from interface: TypeGenerator
Corrects a value of a property so that it fits to the type and facets. It is a precondition that the facets of the property are correct; if necessary, that should be ensured by calling correctFacets(Property). The action taken by the method can afterwards be retrieved by a call to getLastCorrectAction().

Parameters:
inValue - the value
property - the property (to get the facets)
Returns:
the corrected value
Throws:
WrongFacetException - if the facets of the property are erroneous.

correctFacets

public int correctFacets(Property property)
Description copied from interface: TypeGenerator
Checks whether the facets of a property fit to the type and corrects them, if necessary.

Parameters:
property - the property that holds the facets
Returns:
an error code that contains the action taken


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.