1 package tim.prune.data;
4 * Class to represent a Longitude Coordinate
6 public class Longitude extends Coordinate
10 * @param inString string value from file
12 public Longitude(String inString)
20 * @param inValue value of coordinate
21 * @param inFormat format to use
23 protected Longitude(double inValue, int inFormat)
25 super(inValue, inFormat);
26 _cardinal = inValue < 0.0 ? WEST : EAST;
31 * Turn the given character into a cardinal
32 * @see tim.prune.data.Coordinate#getCardinal(char)
34 protected int getCardinal(char inChar)
36 // Longitude recognises E, W and -
43 cardinal = EAST; break;
47 cardinal = WEST; break;
56 * Make a new Longitude object
57 * @see tim.prune.data.Coordinate#makeNew(double, int)
59 protected Coordinate makeNew(double inValue, int inFormat)
61 return new Longitude(inValue, inFormat);