package net.kevxu.senselib;

import android.hardware.Sensor;

public class StepDetectorDataPool {

	private static final String TAG = "StepDetectorDataPool";

	private final static int DEFAULT_POOL_SIZE = 500;

	private int mPoolSize;
	private DataPool mLinearAccelPool;
	private DataPool mGravityPool;

	protected StepDetectorDataPool() {
		this(DEFAULT_POOL_SIZE);
	}

	protected StepDetectorDataPool(int poolSize) {
		mPoolSize = poolSize;
		mLinearAccelPool = new DataPool(mPoolSize);
		mGravityPool = new DataPool(mPoolSize);
	}

	protected StepDetectorDataPool addData(int type, float[] values) {
		if (type == Sensor.TYPE_LINEAR_ACCELERATION) {
			mLinearAccelPool.append(values);
		} else if (type == Sensor.TYPE_GRAVITY) {
			mGravityPool.append(values);
		}

		return this;
	}
}
@@ -22,16 +22,40 @@
 selib;%0A%0A
+import java.util.List;%0A%0A
 import a
@@ -786,16 +786,373 @@
 );%0A%09%09%7D%0A%0A
+%09%09return this;%0A%09%7D%0A%0A%09protected StepDetectorDataPool addDataList(int type, List%3Cfloat%5B%5D%3E valuesList) %7B%0A%09%09if (type == Sensor.TYPE_LINEAR_ACCELERATION) %7B%0A%09%09%09for (float%5B%5D values : valuesList) %7B%0A%09%09%09%09mLinearAccelPool.append(values);%0A%09%09%09%7D%0A%09%09%7D else if (type == Sensor.TYPE_GRAVITY) %7B%0A%09%09%09for (float%5B%5D values : valuesList) %7B%0A%09%09%09%09mGravityPool.append(values);%0A%09%09%09%7D%0A%09%09%7D%0A%0A
 %09%09return

Add addDataList method to StepDetectorDataPool.