TimestampGetter (final long... timestamp) { return new TimestampGetter() { @Override public int size() { return timestamp.length; } @Override public long getTimestamp(int index) { return timestamp[index]; } }; }