@Test public void testValidateAndSetRestriction_Invalid() { FloatRangeScale scale = new FloatRangeScale(); assertEquals(false, scale.validateAndSetRestriction("1/")); assertEquals(false, scale.validateAndSetRestriction("11")); assertEquals(false, scale.validateAndSetRestriction("/")); assertEquals(false, scale.validateAndSetRestriction("/1")); }
public boolean validateAndSetRestriction(String restriction) { if (p.matcher(restriction).matches()) { setRestriction(restriction); return true; } else { return false; } }
FloatRangeScale extends RestrictedScale { public boolean validateAndSetRestriction(String restriction) { if (p.matcher(restriction).matches()) { setRestriction(restriction); return true; } else { return false; } } }
FloatRangeScale extends RestrictedScale { public boolean validateAndSetRestriction(String restriction) { if (p.matcher(restriction).matches()) { setRestriction(restriction); return true; } else { return false; } }  }
FloatRangeScale extends RestrictedScale { public boolean validateAndSetRestriction(String restriction) { if (p.matcher(restriction).matches()) { setRestriction(restriction); return true; } else { return false; } }  @Override String getDisplayName(); @Override FloatRangeValue createValue(); boolean validateAndSetRestriction(String restriction); void setLowerBound(double lower); double getLowerBound(); void setUpperBound(double upper); double getUpperBound(); @Override String getRestriction(); @Override String getReadableRestriction(); @Override void setRestriction(String restriction); @Override boolean isEvaluated(Value value); }
FloatRangeScale extends RestrictedScale { public boolean validateAndSetRestriction(String restriction) { if (p.matcher(restriction).matches()) { setRestriction(restriction); return true; } else { return false; } }  @Override String getDisplayName(); @Override FloatRangeValue createValue(); boolean validateAndSetRestriction(String restriction); void setLowerBound(double lower); double getLowerBound(); void setUpperBound(double upper); double getUpperBound(); @Override String getRestriction(); @Override String getReadableRestriction(); @Override void setRestriction(String restriction); @Override boolean isEvaluated(Value value); static final String floatPattern; static final String pattern; }