Package java.util

Examples of java.util.NoSuchElementException


     *
     * @return the next interval, as cached by {@link #hasNext()}.
     */
    @Deprecated
    public Interval next() {
      if ( ! hasNext() ) throw new NoSuchElementException();
      final Interval result = next;
      next = null;
      return result;
    }
View Full Code Here


  private ZipEntry getEntry( final int index ) {
    ensureDocumentIndex( index );
    ensureZipFile();
    final ZipEntry entry = zipFile.getEntry( Integer.toString( index ) );
    if ( entry == null ) throw new NoSuchElementException( "Failure retrieving entry " + index );
    return entry;
  }
View Full Code Here

  protected static class FakeIterator extends AbstractObjectIterator<Interval> implements IntervalIterator {
    final boolean hasNext;
    private FakeIterator( final boolean hasNext ) { this.hasNext = hasNext; }
    public boolean hasNext() { return hasNext; }
    public void reset() {}
    public Interval next() { throw hasNext ? new UnsupportedOperationException() : new NoSuchElementException(); }
View Full Code Here

      next = advance();
      return ! exhausted;
    }

    public int nextInt() {
      if ( ! hasNext() ) throw new NoSuchElementException();

      last = next;
      next = -1;

      try {
View Full Code Here

    private final Reference2ReferenceMap<Index,IntervalIterator> singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator );
   
    private class RemoteIndexIntervalIterator extends AbstractObjectIterator<Interval> implements IntervalIterator {
      private int pos;
      public Interval next() {     
        if ( ! hasNext() ) throw new NoSuchElementException();
        return Interval.valueOf( position[ pos++ ] );     
      }
View Full Code Here

      return pos < cachedIntervals.size() || intervalIterator.hasNext();
    }
   
    @Deprecated
    public Interval next() {
      if ( ! hasNext() ) throw new NoSuchElementException();
     
      if ( pos < cachedIntervals.size() ) return cachedIntervals.get( pos++ );
      else {
        final Interval next = intervalIterator.next();
        cachedIntervals.add( next );
View Full Code Here

  }
  public boolean hasNext() {
   return ! endOfList();
  }
  public int nextInt() {
   if ( ! hasNext() ) throw new NoSuchElementException();
   try {
    return nextDocument();
   }
   catch ( IOException e ) {
    throw new RuntimeException( e );
View Full Code Here

   }
   public boolean hasNext() {
    return pos < count - 1;
   }
   public Interval next() {
    if ( ! hasNext() ) throw new NoSuchElementException();
    return Interval.valueOf( positionCache[ ++pos ] );
   }
View Full Code Here

        public boolean hasNext() {
          return pos < n;
        }
       
        public int nextInt() {
          if ( ! hasNext() ) throw new NoSuchElementException();
          pos++;
          try {
            return ibs.readGamma();
          }
          catch ( IOException e ) {
View Full Code Here

  public boolean hasNext() {
   return !endOfList();
  }

  public int nextInt() {
   if ( !hasNext() ) throw new NoSuchElementException();
   try {
    return nextDocument();
   }
   catch ( IOException e ) {
    throw new RuntimeException( e );
View Full Code Here

TOP

Related Classes of java.util.NoSuchElementException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.