View Javadoc

1   /*
2    * $Id: GpsCoord.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.example.gpswalker;
12  
13  import org.codehaus.jackson.annotate.JsonProperty;
14  
15  /**
16   * A bean that holds Geo Coordinates
17   * Note that this bean is annotated with Jackson Json annotations.  This allows Mule to automically
18   * serialise this object to and from JSON.
19   */
20  public class GpsCoord
21  {
22      @JsonProperty
23      private float latitude;
24      @JsonProperty
25      private float longitude;
26  
27      public GpsCoord(float lat, float lng)
28      {
29          latitude = lat;
30          longitude = lng;
31      }
32  
33      public float getLatitude()
34      {
35          return latitude;
36      }
37  
38      public float getLongitude()
39      {
40          return longitude;
41      }
42  
43      public void setLatitude(float latitude)
44      {
45          this.latitude = latitude;
46      }
47  
48      public void setLongitude(float longitude)
49      {
50          this.longitude = longitude;
51      }
52  }