01: /*
02: * <copyright>
03: *
04: * Copyright 1997-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26:
27: package org.cougaar.planning.ldm.plan;
28:
29: import org.cougaar.planning.ldm.measure.Latitude;
30: import org.cougaar.planning.ldm.measure.Longitude;
31:
32: public class LatLonPointImpl implements LatLonPoint, NewLatLonPoint,
33: java.io.Serializable {
34:
35: protected Latitude lat = null;
36: protected Longitude lon = null;
37:
38: public LatLonPointImpl() {
39: super ();
40: }
41:
42: public LatLonPointImpl(Latitude la, Longitude lo) {
43: lat = la;
44: lon = lo;
45: }
46:
47: /** @return Latitude - the Latitude representing this location */
48: public Latitude getLatitude() {
49: return lat;
50: }
51:
52: /** @return Longitude - the Longitude representing this location */
53: public Longitude getLongitude() {
54: return lon;
55: }
56:
57: /** @param latitude - set the Latitude representing this location */
58: public void setLatitude(Latitude latitude) {
59: lat = latitude;
60: }
61:
62: /** @param longitude - set the Longitude representing this location */
63: public void setLongitude(Longitude longitude) {
64: lon = longitude;
65: }
66:
67: public Object clone() {
68: return new LatLonPointImpl(lat, lon);
69: }
70:
71: public String toString() {
72: return "<" + lat + ", " + lon + ">";
73: }
74:
75: }
|