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 public Longitude(double inValue, int inFormat)
25 super(inValue, inFormat, inValue < 0.0 ? WEST : EAST);
30 * Turn the given character into a cardinal
31 * @see tim.prune.data.Coordinate#getCardinal(char)
33 protected int getCardinal(char inChar)
35 // Longitude recognises E, W and -
42 cardinal = EAST; break;
46 cardinal = WEST; break;
55 * Make a new Longitude object
56 * @see tim.prune.data.Coordinate#makeNew(double, int)
58 protected Coordinate makeNew(double inValue, int inFormat)
60 return new Longitude(inValue, inFormat);