void (List<BidiRun> runs, BidiRun run) { int size = runs.size(); if (size > 0 && runs.get(size - 1).level == 0 && run.level == 0) { BidiRun lastRun = runs.remove(size - 1); assert lastRun.endOffset == run.startOffset; runs.add(new BidiRun((byte)0, lastRun.startOffset, run.endOffset)); } else { runs.add(run); } }