for (Integer priority : priorities) {
int hole = offset;
int cursor = offset;
while (cursor < sorted.size()) {
ReceiveProp rp = sorted.get(cursor);
boolean changesOften = rp.isFlagSet(PropFlag.CHANGES_OFTEN) && priority == 64;
if (changesOften || rp.getPriority() == priority) {
Collections.swap(sorted, cursor, hole);
hole++;
offset++;
}
cursor++;