@Override public Snapshot getSnapshot() { final int s = size(); long[] copy = new long[s]; for (int i = 0; i < s; i++) { copy[i] = values.get(i); } return new UniformSnapshot(copy); } }
@Override public Snapshot getSnapshot() { final int s = size(); final List<Long> copy = new ArrayList<Long>(s); for (int i = 0; i < s; i++) { copy.add(values.get(i)); } return new Snapshot(copy); } }
@Override public Snapshot getSnapshot() { final int s = size(); final List<Long> copy = new ArrayList<Long>(s); for (int i = 0; i < s; i++) { copy.add(values.get(i)); } return new Snapshot(copy); } }