public void addDataLine(String[] values){
  assert (headers != null && !headers.isEmpty() && headers.size() == values.length);
  if (data == null) {
    data=new ArrayList<>(totalLines);
    timeToDataIndex=new HashMap<>();
  }
  Map<String,String> dataMap=new HashMap<>();
  int numHeaders=headers.size();
  int currentDataIndex=data.size();
  for (int index=0; index < numHeaders; index++) {
    String header=headers.get(index);
    String value=values[index];
    if (value.equals(ZERO)) {
      value=ZERO;
    }
 else     if (value.equals(NO_DATA)) {
      value=NO_DATA;
    }
    dataMap.put(header,value);
    if (header.equals(TIME_UTC)) {
      timeToDataIndex.put(value,currentDataIndex);
    }
  }
  data.add(dataMap);
}

public void addDataLine ( String [ ] values ) { assert ( headers != null && ! headers . isEmpty ( ) && headers . size ( ) == values . length ) ; if ( data == null ) { data = new ArrayList < > ( totalLines ) ; timeToDataIndex = new HashMap < > ( ) ; } Map < String , String > dataMap = new HashMap < > ( ) ; int numHeaders = headers . size ( ) ; int currentDataIndex = data . size ( ) ; for ( int index = 0 ; index < numHeaders ; index ++ ) { String header = headers . get ( index ) ; String value = values [ index ] ; if ( value . equals ( ZERO ) ) { value = ZERO ; } else if ( value . equals ( NO_DATA ) ) { value = NO_DATA ; } dataMap . put ( header , value ) ; if ( header . equals ( TIME_UTC ) ) { timeToDataIndex . put ( value , currentDataIndex ) ; } } data . add ( dataMap ) ; }
add the data values . this would represent a single line in the perpetual data file .
