public class DoubleRangeMetaDataTransformer extends AbstractValidationParameterAwareTransformer
{
protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
{
Map<String, Object> results = new HashMap<String, Object>();
DoubleRange annotation = metaDataEntry.getValue(DoubleRange.class);
double minimum = annotation.minimum();
if(minimum != Double.MIN_VALUE)
{
results.put(CommonMetaDataKeys.RANGE_MIN, minimum);
}
else
{
results.put(CommonMetaDataKeys.RANGE_MIN_DEFAULT, minimum);
}
double maximum = annotation.maximum();
if(maximum != Double.MAX_VALUE)
{
results.put(CommonMetaDataKeys.RANGE_MAX, maximum);
}