public static List < DataPoint > parse ( int [ ] values , long ts ) { List < DataPoint > ret = new ArrayList < DataPoint > ( values . length ) ; for ( int v : values ) { ret . add ( new DataPoint ( ts , v ) ) ; } return ret ; }
Takes an array of values and converts it into a list of DataPoint s with the same timestamp .