~ubuntu-branches/ubuntu/utopic/gpsprune/utopic

« back to all changes in this revision

Viewing changes to tim/prune/data/SpeedValue.java

  • Committer: Package Import Robot
  • Author(s): Mònica Ramírez Arceda
  • Date: 2013-05-15 10:26:51 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20130515102651-130bcw88wox3u0q0
Tags: 15-1
* New upstream version
  - "nautical mile" is added to unit selector (Closes: #639503)
* debian/control:
  - Add myself as an uploader
  - Standards-Version bump to 3.9.4, no changes needed
* debian/copyright:
  - Add required Copyright field to tim/prune/function/srtm/gen/ files
  - Update years
* debian/scripts/gpsprune:
  - Fix sed commands, when there is no host/port, proxyhost/proxyport
    variables must be empty.
    Thanks to Simó Albert i Beltran <sim6@probeta.net> and to
    <debian@activityworkshop.net> for the patch!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package tim.prune.data;
 
2
 
 
3
/**
 
4
 * Holder for a speed value, including a boolean valid flag
 
5
 */
 
6
public class SpeedValue
 
7
{
 
8
        /** Valid flag */
 
9
        private boolean _valid = false;
 
10
        /** Value as a double, using current units */
 
11
        private double  _value = 0.0;
 
12
 
 
13
 
 
14
        /**
 
15
         * Set the flag to invalid
 
16
         */
 
17
        public void setInvalid()
 
18
        {
 
19
                _valid = false;
 
20
                _value = 0.0;
 
21
        }
 
22
 
 
23
        /**
 
24
         * @param inValue speed value to set
 
25
         */
 
26
        public void setValue(double inValue)
 
27
        {
 
28
                _valid = true;
 
29
                _value = inValue;
 
30
        }
 
31
 
 
32
        /**
 
33
         * @return true if value is valid
 
34
         */
 
35
        public boolean isValid() {
 
36
                return _valid;
 
37
        }
 
38
 
 
39
        /**
 
40
         * @return numeric value
 
41
         */
 
42
        public double getValue() {
 
43
                return _value;
 
44
        }
 
45
}