public SortedSet<PositionType> findPositionsWithRightEdgeInRange(int start, int end) { // LOG.warning("Finding positions in range "+start+","+end); // LOG.warning("Right edges "+rightEdges); PositionType p1 = new PositionType(); p1.endPos = start; p1.startPos = 0; PositionType p2 = new PositionType(); p2.endPos = end; p2.startPos = end; SortedSet<PositionType> o1 = rightEdges.subSet(p1, p2); // p1.startPos = start; // p2.startPos = end; // SortedSet<PositionType> o2 = leftEdges.subSet(p1, p2); // o1.addAll(o2); return o1; }
public PositionType findNearestPositionOccuringBefore(int pos) { PositionType t = new PositionType(); t.endPos = pos; return rightEdges.lower(t); }
public PositionType findNearestPositionOccurringAfter(int pos) { PositionType t = new PositionType(); t.startPos = pos; return leftEdges.ceiling(t); }