Angle implements AttributeValue { public static Angle grad(final double grads) { return new Angle(grads, Angle.Unit.GRAD); } Angle(final double value, final Unit unit); static Angle deg(final double degs); static Angle grad(final double grads); static Angle rad(final double rads); @Override String toString(); @Override String getValue(); static final Angle NO_ROTATING; static final Angle ROTATE_90; static final Angle ROTATE_180; static final Angle ROTATE_270; }
@Test public void testGrad() { final Angle r = Angle.grad(16); Assert.assertEquals("16.0grad", r.toString()); }