@Test public void testParse() { DirectionAlongMeridian dir; String name; name = "South along 180 deg"; dir = DirectionAlongMeridian.parse(name); assertNotNull(dir); assertEquals(AxisDirection.SOUTH, dir.baseDirection); assertEquals(180, dir.meridian, 0); assertEquals(name, dir.toString()); name = "South along 90 deg East"; dir = DirectionAlongMeridian.parse(name); assertNotNull(dir); assertEquals(AxisDirection.SOUTH, dir.baseDirection); assertEquals(90, dir.meridian, 0); assertEquals(name, dir.toString()); name = "South along 90 deg West"; dir = DirectionAlongMeridian.parse(name); assertNotNull(dir); assertEquals(AxisDirection.SOUTH, dir.baseDirection); assertEquals(-90, dir.meridian, 0); assertEquals(name, dir.toString()); name = "North along 45 deg East"; dir = DirectionAlongMeridian.parse(name); assertNotNull(dir); assertEquals(AxisDirection.NORTH, dir.baseDirection); assertEquals(45, dir.meridian, 0); assertEquals(name, dir.toString()); }
public static DirectionAlongMeridian parse(final AxisDirection direction) { final DirectionAlongMeridian candidate = parse(direction.name()); if (candidate != null) { candidate.direction = direction; } return candidate; }
DirectionAlongMeridian implements Comparable, Serializable { public static DirectionAlongMeridian parse(final AxisDirection direction) { final DirectionAlongMeridian candidate = parse(direction.name()); if (candidate != null) { candidate.direction = direction; } return candidate; } }
DirectionAlongMeridian implements Comparable, Serializable { public static DirectionAlongMeridian parse(final AxisDirection direction) { final DirectionAlongMeridian candidate = parse(direction.name()); if (candidate != null) { candidate.direction = direction; } return candidate; } private  DirectionAlongMeridian(final AxisDirection baseDirection, final double meridian); }
DirectionAlongMeridian implements Comparable, Serializable { public static DirectionAlongMeridian parse(final AxisDirection direction) { final DirectionAlongMeridian candidate = parse(direction.name()); if (candidate != null) { candidate.direction = direction; } return candidate; } private  DirectionAlongMeridian(final AxisDirection baseDirection, final double meridian); static DirectionAlongMeridian parse(final AxisDirection direction); static DirectionAlongMeridian parse(final String name); AxisDirection getDirection(); double getAngle(final DirectionAlongMeridian other); int compareTo(final Object object); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
DirectionAlongMeridian implements Comparable, Serializable { public static DirectionAlongMeridian parse(final AxisDirection direction) { final DirectionAlongMeridian candidate = parse(direction.name()); if (candidate != null) { candidate.direction = direction; } return candidate; } private  DirectionAlongMeridian(final AxisDirection baseDirection, final double meridian); static DirectionAlongMeridian parse(final AxisDirection direction); static DirectionAlongMeridian parse(final String name); AxisDirection getDirection(); double getAngle(final DirectionAlongMeridian other); int compareTo(final Object object); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); final AxisDirection baseDirection; final double meridian; }