class NumberFieldActions implements AtlasFieldAction {

    @AtlasActionProcessor
    public static Number convertAreaUnit(ConvertAreaUnit convertAreaUnit, Number input) {
        if (input == null) {
            return 0;
        }

        if (convertAreaUnit == null || convertAreaUnit.getFromUnit() == null
                || convertAreaUnit.getToUnit() == null) {
            throw new IllegalArgumentException("ConvertAreaUnit must be specified  with fromUnit and toUnit");
        }

        AreaUnitType fromUnit = convertAreaUnit.getFromUnit();
        AreaUnitType toUnit = convertAreaUnit.getToUnit();
        double rate = areaConvertionTable.get(fromUnit).get(toUnit);
        return doMultiply(input, rate);
    }

}