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