private boolean addState(long stateNumber){
  if (firstState < 0) {
    firstState=stateNumber;
  }
 else   if (stepSize < 0) {
    stepSize=(int)(stateNumber - firstState);
  }
 else {
    int step=(int)(stateNumber - lastState);
    if (step != stepSize) {
      return false;
    }
  }
  lastState=stateNumber;
  return true;
}

private boolean addState ( long stateNumber ) { if ( firstState < 0 ) { firstState = stateNumber ; } else if ( stepSize < 0 ) { stepSize = ( int ) ( stateNumber - firstState ) ; } else { int step = ( int ) ( stateNumber - lastState ) ; if ( step != stepSize ) { return false ; } } lastState = stateNumber ; return true ; }
add a state number for these traces . this should be called before adding values for each trace . the spacing between statenumbers should remain constant .
