/** * {@inheritDoc} */ public AnnotationCursor annotationCursor(int start, int end, ReadableStringSet keys) { if (keys == null) { keys = knownKeys(); } else { checkValidPersistentKeys(keys); } return annotations.annotationCursor(start, end, keys); }
m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(0, 100, strs())); expectFinished(m.annotationCursor(0, 100, strs("a", "b"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b", "c"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b", "c")));
m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(0, 100, strs())); expectFinished(m.annotationCursor(0, 100, strs("a", "b"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b", "c"))); m.finish(); expectFinished(m.annotationCursor(40, 60, strs())); expectFinished(m.annotationCursor(40, 60, strs("a"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b"))); expectFinished(m.annotationCursor(40, 60, strs("a", "b", "c")));
AnnotationCursor c1 = m.annotationCursor(i, 100 - i, strs("a")); AnnotationCursor c2 = m.annotationCursor(i, 100 - i, strs("a", "b")); AnnotationCursor c3 = m.annotationCursor(i, 100 - i, strs("a", "b", "c")); AnnotationCursor c4 = m.annotationCursor(i, 100 - i, strs("c", "d")); AnnotationCursor ca = m.annotationCursor(i, 100 - i, strs("a", "b", "c", "d")); AnnotationCursor cx = m.annotationCursor(i, 100 - i, strs("x", "y", "z")); AnnotationCursor c5 = m.annotationCursor(30, 40, strs("c", "d")); expectFinished(c5); c5 = m.annotationCursor(29, 40, strs("c", "d")); checkAdvance(c5, 30, "c", "d"); expectFinished(c5); c5 = m.annotationCursor(30, 41, strs("c", "d")); checkAdvance(c5, 40, "c", "d"); expectFinished(c5);
AnnotationCursor c1 = m.annotationCursor(i, 100 - i, strs("a")); AnnotationCursor c2 = m.annotationCursor(i, 100 - i, strs("a", "b")); AnnotationCursor c3 = m.annotationCursor(i, 100 - i, strs("a", "b", "c")); AnnotationCursor c4 = m.annotationCursor(i, 100 - i, strs("c", "d")); AnnotationCursor ca = m.annotationCursor(i, 100 - i, strs("a", "b", "c", "d")); AnnotationCursor cx = m.annotationCursor(i, 100 - i, strs("x", "y", "z")); AnnotationCursor c5 = m.annotationCursor(30, 40, strs("c", "d")); expectFinished(c5); c5 = m.annotationCursor(29, 40, strs("c", "d")); checkAdvance(c5, 30, "c", "d"); expectFinished(c5); c5 = m.annotationCursor(30, 41, strs("c", "d")); checkAdvance(c5, 40, "c", "d"); expectFinished(c5);
public void testInitialStartLocation() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(100); m.finish(); // -1 if no hasNext() AnnotationCursor c = m.annotationCursor(40, 80, strs("a")); assertEquals(-1, c.currentLocation()); m.begin(); m.skip(50); m.startAnnotation("a", "1"); m.skip(10); m.endAnnotation("a"); m.finish(); // start value, if hasNext(); c = m.annotationCursor(40, 80, strs("a")); assertEquals(40, c.currentLocation()); }
public void testEmptySet() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(1); m.startAnnotation("a", "1"); m.insert(1); m.endAnnotation("a"); m.finish(); expectFinished(m.annotationCursor(0, m.size(), strs())); } }
public void testInitialStartLocation() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(100); m.finish(); // -1 if no hasNext() AnnotationCursor c = m.annotationCursor(40, 80, strs("a")); assertEquals(-1, c.currentLocation()); m.begin(); m.skip(50); m.startAnnotation("a", "1"); m.skip(10); m.endAnnotation("a"); m.finish(); // start value, if hasNext(); c = m.annotationCursor(40, 80, strs("a")); assertEquals(40, c.currentLocation()); }
public void testEmptySet() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(1); m.startAnnotation("a", "1"); m.insert(1); m.endAnnotation("a"); m.finish(); expectFinished(m.annotationCursor(0, m.size(), strs())); } }
m.annotationCursor(0, 0, emptySet); m.annotationCursor(0, 0, acceptableSet); m.annotationCursor(-1, 0, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) { m.annotationCursor(1, 0, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) { m.annotationCursor(0, 2, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) {
m.annotationCursor(0, 0, emptySet); m.annotationCursor(0, 0, acceptableSet); m.annotationCursor(-1, 0, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) { m.annotationCursor(1, 0, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) { m.annotationCursor(0, 2, acceptableSet); fail(); } catch (IndexOutOfBoundsException e) {