public IntSortedSet headSet( final int to ) { if ( this == EMPTY_INTERVAL ) return this; if ( to > left ) return to > right ? this : valueOf( left, to - 1 ); else return EMPTY_INTERVAL; }
public IntSortedSet tailSet( final int from ) { if ( this == EMPTY_INTERVAL ) return this; if ( from <= right ) return from <= left ? this : valueOf( from, right ); else return EMPTY_INTERVAL; }
@Override public IntSortedSet headSet(final int to) { if (this == EMPTY_INTERVAL) return this; if (to > left) return to > right ? this : valueOf(left, to - 1); else return EMPTY_INTERVAL; }
public IntSortedSet tailSet( final int from ) { if ( this == EMPTY_INTERVAL ) return this; if ( from <= right ) return from <= left ? this : valueOf( from, right ); else return EMPTY_INTERVAL; }
public IntSortedSet headSet( final int to ) { if ( this == EMPTY_INTERVAL ) return this; if ( to > left ) return to > right ? this : valueOf( left, to - 1 ); else return EMPTY_INTERVAL; }
public IntSortedSet subSet( final int from, final int to ) { if ( this == EMPTY_INTERVAL ) return this; if ( from > to ) throw new IllegalArgumentException( "Start element (" + from + ") is larger than end element (" + to + ")" ); if ( to <= left || from > right || from == to ) return EMPTY_INTERVAL; if ( from <= left && to > right ) return this; return valueOf( Math.max( left, from ), Math.min( right, to - 1 ) ); }
@Override public IntSortedSet subSet(final int from, final int to) { if (this == EMPTY_INTERVAL) return this; if (from > to) throw new IllegalArgumentException("Start element (" + from + ") is larger than end element (" + to + ")"); if (to <= left || from > right || from == to) return EMPTY_INTERVAL; if (from <= left && to > right) return this; return valueOf(Math.max(left, from), Math.min(right, to - 1)); }
public IntSortedSet subSet( final int from, final int to ) { if ( this == EMPTY_INTERVAL ) return this; if ( from > to ) throw new IllegalArgumentException( "Start element (" + from + ") is larger than end element (" + to + ")" ); if ( to <= left || from > right || from == to ) return EMPTY_INTERVAL; if ( from <= left && to > right ) return this; return valueOf( Math.max( left, from ), Math.min( right, to - 1 ) ); }
@Override public Interval nextInterval() throws IOException { if ( nextLeft == -1 ) { if ( endOfProcess ) return null; advance(); } if ( nextLeft == -1 ) return null; final Interval result = Interval.valueOf( nextLeft, nextRight ); nextLeft = -1; return result; }
@Override public Interval nextInterval() throws IOException { if ( nextLeft == -1 ) { if ( endOfProcess ) return null; advance(); } if ( nextLeft == -1 ) return null; final Interval result = Interval.valueOf( nextLeft, nextRight ); nextLeft = -1; return result; }
public Interval next() { if ( ! hasNext() ) throw new NoSuchElementException(); return Interval.valueOf( positionCache[ ++pos ] ); } public Interval nextInterval() {
@Override public Interval nextInterval() throws IOException { final int nextPosition = indexIterator.nextPosition(); return nextPosition == IndexIterator.END_OF_POSITIONS ? null : Interval.valueOf( nextPosition ); }
public Interval nextInterval () throws IOException { final int first = hasNextInternal(); if ( first == -1 ) return null; return Interval.valueOf( last = curr[ first ] ); }
public Interval next() { if ( ! hasNext() ) throw new NoSuchElementException(); return Interval.valueOf( positionCache[ ++pos ] ); } public Interval nextInterval() {
@Override public Interval nextInterval() throws IOException { if ( nextLeft == -1 ) { if ( endOfProcess ) return null; advance(); } if ( nextLeft == -1 ) return null; final Interval result = Interval.valueOf( nextLeft, nextRight ); nextLeft = -1; return result; }
@Override public Interval nextInterval() throws IOException { if ( nextLeft == -1 ) { if ( endOfProcess ) return null; advance(); } if ( nextLeft == -1 ) return null; final Interval result = Interval.valueOf( nextLeft, nextRight ); nextLeft = -1; return result; }
public Interval next() { if ( ! hasNext() ) throw new NoSuchElementException(); return Interval.valueOf( position[ pos++ ] ); } public void intervalTerms( final IntSet terms ) {
public Interval next() { if ( ! hasNext() ) throw new NoSuchElementException(); return Interval.valueOf( position[ pos++ ] ); } public void intervalTerms( final LongSet terms ) {
@Override public Interval nextInterval() throws IOException { final int firstPoint = indexIterator.nextPosition(); if ( firstPoint == IndexIterator.END_OF_POSITIONS ) return null; ++anno; return Interval.valueOf( firstPoint - anno, indexIterator.nextPosition() - anno - 1 ); }
public Interval nextInterval() throws IOException { if ( positionQueue.isEmpty() ) return null; int first = positionQueue.first(); final int result = curr[ first ]; do if ( ( curr[ first ] = indexIterator[ first ].nextPosition() ) == IndexIterator.END_OF_POSITIONS ) positionQueue.dequeue(); else positionQueue.changed(); while ( ! positionQueue.isEmpty() && curr[ first = positionQueue.first() ] == result ); if ( DEBUG ) System.err.println( this + ".nextInterval() => " + Interval.valueOf( result ) ); return Interval.valueOf( result ); }