1 19 20 package org.netbeans.modules.editor.guards; 21 22 import java.util.Comparator ; 23 import org.netbeans.api.editor.guards.GuardedSection; 24 25 28 final class GuardedPositionComparator implements Comparator <GuardedSection> { 29 32 public int compare(GuardedSection o1, GuardedSection o2) { 33 return getOffset(o1) - getOffset(o2); 34 } 35 36 37 private int getOffset(GuardedSection o) { 38 return o.getStartPosition().getOffset(); 39 } 40 } 41 | Popular Tags |