const int SPEED_COUNT = 10; void setSpeed(float speed) { for(int i = SPEED_COUNT - 1;i>0;i--) { this.mSpeed[i] = this.mSpeed[i - 1]; } this.mSpeed[0] = speed; }