@Test public void createLabels1() { List<String> labels = TimeScales.createLabels(Arrays.asList(create(2013,03,12,1,30,15,123), create(2013,03,12,1,30,16,123), create(2013,03,12,1,30,17,123))); assertThat(labels, equalTo(Arrays.asList("2013/03/12 01:30:15.123000000", "2013/03/12 01:30:16.123000000", "2013/03/12 01:30:17.123000000"))); }
static List<String> createLabels(List<Instant> timestamps) { if (timestamps.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(timestamps.size()); for (Instant timestamp : timestamps) { ZonedDateTime z = ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(z.toInstant()); System.out.println(z.format(format)); result.add(format.format(ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()))); } return result; }
TimeScales { static List<String> createLabels(List<Instant> timestamps) { if (timestamps.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(timestamps.size()); for (Instant timestamp : timestamps) { ZonedDateTime z = ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(z.toInstant()); System.out.println(z.format(format)); result.add(format.format(ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()))); } return result; } }
TimeScales { static List<String> createLabels(List<Instant> timestamps) { if (timestamps.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(timestamps.size()); for (Instant timestamp : timestamps) { ZonedDateTime z = ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(z.toInstant()); System.out.println(z.format(format)); result.add(format.format(ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()))); } return result; }  }
TimeScales { static List<String> createLabels(List<Instant> timestamps) { if (timestamps.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(timestamps.size()); for (Instant timestamp : timestamps) { ZonedDateTime z = ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(z.toInstant()); System.out.println(z.format(format)); result.add(format.format(ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()))); } return result; }  static TimeScale linearAbsoluteScale(); }
TimeScales { static List<String> createLabels(List<Instant> timestamps) { if (timestamps.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(timestamps.size()); for (Instant timestamp : timestamps) { ZonedDateTime z = ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(z.toInstant()); System.out.println(z.format(format)); result.add(format.format(ZonedDateTime.ofInstant(timestamp, ZoneId.systemDefault()))); } return result; }  static TimeScale linearAbsoluteScale(); final static int HOUR_FIELD_ID; final static int FIRST_HOUR; final static int DAY_FIELD_ID; final static int FIRST_DAY; final static int WEEK_FIELD_ID; final static int FIRST_WEEK; }