@Test public void testUnitsMatch2() { Unit<Angle> degree = Units.autoCorrect( new TransformedUnit<>( SI.RADIAN, MultiplyConverter.of(0.017453292519943295))); assertEquals( "auto correction of degree definition from EsriLookupTest", NonSI.DEGREE_ANGLE, degree); assertTrue("degree definition from EsriLookupTest", isDegreeAngle(degree)); }
@SuppressWarnings("unchecked") public static <Q extends Quantity<Q>> Unit<Q> autoCorrect(Unit<Q> unit) { return DefaultUnitParser.getInstance(SimpleUnitFormat.Flavor.Default) .getEquivalentUnit(unit); }
Units { @SuppressWarnings("unchecked") public static <Q extends Quantity<Q>> Unit<Q> autoCorrect(Unit<Q> unit) { return DefaultUnitParser.getInstance(SimpleUnitFormat.Flavor.Default) .getEquivalentUnit(unit); } }
Units { @SuppressWarnings("unchecked") public static <Q extends Quantity<Q>> Unit<Q> autoCorrect(Unit<Q> unit) { return DefaultUnitParser.getInstance(SimpleUnitFormat.Flavor.Default) .getEquivalentUnit(unit); } private  Units(); }
Units { @SuppressWarnings("unchecked") public static <Q extends Quantity<Q>> Unit<Q> autoCorrect(Unit<Q> unit) { return DefaultUnitParser.getInstance(SimpleUnitFormat.Flavor.Default) .getEquivalentUnit(unit); } private  Units(); static UnitFormat getDefaultFormat(); static String toName(Unit<?> unit); static String toSymbol(Unit<?> unit); @SuppressWarnings("unchecked") static Unit<Q> autoCorrect(Unit<Q> unit); static final boolean equals(Unit<?> unit1, Unit<?> unit2); static UnitConverter getConverterToAny(Unit<?> fromUnit, Unit<?> toUnit); static Unit<?> parseUnit(String name); }
Units { @SuppressWarnings("unchecked") public static <Q extends Quantity<Q>> Unit<Q> autoCorrect(Unit<Q> unit) { return DefaultUnitParser.getInstance(SimpleUnitFormat.Flavor.Default) .getEquivalentUnit(unit); } private  Units(); static UnitFormat getDefaultFormat(); static String toName(Unit<?> unit); static String toSymbol(Unit<?> unit); @SuppressWarnings("unchecked") static Unit<Q> autoCorrect(Unit<Q> unit); static final boolean equals(Unit<?> unit1, Unit<?> unit2); static UnitConverter getConverterToAny(Unit<?> fromUnit, Unit<?> toUnit); static Unit<?> parseUnit(String name); static final Unit<Angle> DEGREE_ANGLE; static final Unit<Angle> DEGREE_MINUTE_SECOND; static final Unit<Angle> GRADE; static final Unit<Angle> MICRORADIAN; static final Unit<Angle> MINUTE_ANGLE; static final Unit<Angle> RADIAN; static final Unit<Angle> SEXAGESIMAL_DMS; static final Unit<Angle> SECOND_ANGLE; static final Unit<Dimensionless> PPM; static final Unit<Dimensionless> ONE; static final Unit<Length> FOOT; static final Unit<Length> METRE; static final Unit<Length> KILOMETER; static final Unit<Length> NAUTICAL_MILE; static final Unit<Length> PIXEL; static final Unit<Time> DAY; static final Unit<Time> MONTH; static final Unit<Time> YEAR; }