@Test public void testConstructor_Types() { System.out.println("NumberField(Types)"); for (Types type : Types.values()) { try { new NumberField(type); if (!isNumberType(type)) { fail("Incorrectly accepted " + type.getType() + " as a valid number type"); } } catch (OperationException ex) { if (ex.getErrorCode() != ErrorCode.DATATYPE_MISMATCH) { fail("Incorrect error code reported for data type mismatch"); } if (isNumberType(type)) { fail("Incorrectly reported " + type.getType() + " as an invalid number type"); } } } }
@Override public Types getType() { return type; }
NumberField implements FieldType<Number> { @Override public Types getType() { return type; } }
NumberField implements FieldType<Number> { @Override public Types getType() { return type; } NumberField(final Types type);  NumberField(final Types type, final Number defaultValue);  NumberField(final Types type, final int precision);  NumberField(final int scale, final Types type);  NumberField(final Types type, final int precision, final Number defaultValue);  NumberField(final int scale, final Types type, final Number defaultValue);  NumberField(final Types type, final int precision, final int scale);  NumberField(final Types type, final int precision, final int scale, final Number defaultValue); }
NumberField implements FieldType<Number> { @Override public Types getType() { return type; } NumberField(final Types type);  NumberField(final Types type, final Number defaultValue);  NumberField(final Types type, final int precision);  NumberField(final int scale, final Types type);  NumberField(final Types type, final int precision, final Number defaultValue);  NumberField(final int scale, final Types type, final Number defaultValue);  NumberField(final Types type, final int precision, final int scale);  NumberField(final Types type, final int precision, final int scale, final Number defaultValue); @Override Types getType(); int getPrecision(); Integer getScale(); @Override Number getDefaultValue(); @Override boolean hasDefaultValue(); @Override Number convert(Object objValue); @Override JSONObject toJson(); }
NumberField implements FieldType<Number> { @Override public Types getType() { return type; } NumberField(final Types type);  NumberField(final Types type, final Number defaultValue);  NumberField(final Types type, final int precision);  NumberField(final int scale, final Types type);  NumberField(final Types type, final int precision, final Number defaultValue);  NumberField(final int scale, final Types type, final Number defaultValue);  NumberField(final Types type, final int precision, final int scale);  NumberField(final Types type, final int precision, final int scale, final Number defaultValue); @Override Types getType(); int getPrecision(); Integer getScale(); @Override Number getDefaultValue(); @Override boolean hasDefaultValue(); @Override Number convert(Object objValue); @Override JSONObject toJson();  }