Code example for Vector

Methods: isEmptylastElement

0
				buf.append(' ');
				buf.append(Double.toString(Math.round(1000.0 * p.sumDistance / 1000.0) / 1000.0d));
			} else if (d == Dim.SPEED) {
				double deltaTime = p.sumTime;
				double deltaDist = p.sumDistance;
				if (!posHist.isEmpty()) {
					deltaTime -= posHist.lastElement().sumTime;
					deltaDist -= posHist.lastElement().sumDistance;
				} 
				double speed = 0; // km/h
				if (deltaTime != 0) {
					speed = deltaDist / deltaTime;
				} 
				buf.append(' ');
				buf.append(Double.toString(speed));
			} 
		} 
	}; 
 
	class Pos { 
Stop searching for code, let great code find you!  Add Codota to your java IDE