1 if (Garmin == undefined) var Garmin = {};
  2 /**
  3  * Copyright © 2007-2010 Garmin Ltd. or its subsidiaries.
  4  *
  5  * Licensed under the Apache License, Version 2.0 (the 'License')
  6  * you may not use this file except in compliance with the License.
  7  * You may obtain a copy of the License at
  8  *
  9  *    http://www.apache.org/licenses/LICENSE-2.0
 10  *
 11  * Unless required by applicable law or agreed to in writing, software
 12  * distributed under the License is distributed on an 'AS IS' BASIS,
 13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  * See the License for the specific language governing permissions and
 15  * limitations under the License.
 16  * 
 17  * @fileoverview Garmin.Measurement - A datastructure designed to contain a single data measurement.
 18  * @version 1.9
 19  */
 20 /**Represent a real measurement.
 21  * @class Garmin.Measurement
 22  * @constructor 
 23  * @param value - value of the measurement
 24  * @param context - the context of the measurement (feet, seconds, etc...)
 25  */
 26 Garmin.Measurement = function(value, context){};
 27 Garmin.Measurement = Class.create();
 28 Garmin.Measurement.prototype = {
 29 
 30 	initialize: function(value, context) {
 31 		this.value = value;
 32 		this.context = context;
 33 	},
 34 	
 35 	getContext: function() {
 36 		return this.context;
 37 	},
 38 	
 39 	setContext: function(context) {
 40 		this.context = context;
 41 	},
 42 	
 43 	getValue: function() {
 44 		return this.value;
 45 	},
 46 	
 47 	setValue: function(value) {
 48 		this.value = value;
 49 	},
 50 	
 51 	printMe: function(tabs) {
 52 		var output = "";
 53 		output += tabs + "  [Measurement]\n";
 54 		output += tabs + "    value: " + this.value + '\n';
 55 		//output += tabs + "    context: " + this.context + '\n';
 56 		return output;
 57 	},
 58 	
 59 	toString: function() {
 60 		return this.value + " " + this.context;
 61 	}
 62 };
 63