TraceInfo (@NotNull StreamCall call, @NotNull Value value) { if (!(value instanceof ArrayReference array)) { throw new UnexpectedValueTypeException("Array reference expected. But " + value.type().name() + " received"); } final TraceInfo resolved = myPeekResolver.resolve(call, array.getValue(0)); final Map<Integer, TraceElement> before = resolved.getValuesOrderBefore(); if (before.isEmpty()) { return resolved; } int timeAfter = extractTime(array) + 1; final PrimitiveIterator.OfInt iterator = IntStreamEx.of(before.keySet()).sorted().iterator(); final Map<Integer, TraceElement> after = new HashMap<>(before.size()); while (iterator.hasNext()) { final int timeBefore = iterator.next(); final TraceElement elementBefore = before.get(timeBefore); final TraceElement elementAfter = new TraceElementImpl(timeAfter, elementBefore.getValue()); after.put(timeAfter, elementAfter); ++timeAfter; } return new ValuesOrderInfo(call, before, after); }