@Test public void testIsValidForFieldTypeDouble() { assertTrue(constraint.isValidForFieldType(DoubleType.TYPE)); }
@Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); }
MinMaxConstraint implements FieldConstraint, Serializable { @Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); } }
MinMaxConstraint implements FieldConstraint, Serializable { @Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); } MinMaxConstraint(String type); }
MinMaxConstraint implements FieldConstraint, Serializable { @Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); } MinMaxConstraint(String type); @Override String getType(); @Override boolean isValidForFieldType(Type fieldType); Number getValue(); void setValue(Number value); }
MinMaxConstraint implements FieldConstraint, Serializable { @Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); } MinMaxConstraint(String type); @Override String getType(); @Override boolean isValidForFieldType(Type fieldType); Number getValue(); void setValue(Number value); static final String MIN; static final String MAX; }