Package java.util

Examples of java.util.NoSuchElementException


      return more;
    }

    public Object[] next() {
      if(! more) {
        throw new NoSuchElementException();
      }

      if(j[0] < 0) {
        for(int i=0; i<n; i++) {
          j[i] = i;
View Full Code Here


         * @return next multiple-valued key
         */
        public Object next() {
            advance();
            if (m_currentKey == null) {
                throw new NoSuchElementException("Past end of list");
            } else {
                m_isConsumed = true;
                return m_currentKey;
            }
        }
View Full Code Here

        if (m_offset < m_array.length) {
            Object result = m_array[m_offset];
            advance();
            return result;
        } else {
            throw new NoSuchElementException();
        }
    }
View Full Code Here

        return !reachedEnd_;
    }

    public int next() throws XMLStreamException {
        if(reachedEnd_) {
            throw new NoSuchElementException("Already reached to the END of the document");
        }
        return handleNext();
    }
View Full Code Here

            return nextEntry != null;
        }

        HashEntry<V> nextEntry() {
            if(nextEntry == null)
                throw new NoSuchElementException();
            lastReturned = nextEntry;
            advance();
            return lastReturned;
        }
View Full Code Here

            if(curBucket != null) {
                BucketEntry e = curBucket;
                this.curBucket = e.next;
                return e;
            }
            throw new NoSuchElementException();
        }
View Full Code Here

            }

            public BucketEntry next() {
                entry = entry.next;
                if(entry == entryChainHeader) {
                    throw new NoSuchElementException();
                }
                return entry;
            }
View Full Code Here

  }

  public boolean visitPre( final Select node ) throws QueryBuilderVisitorException {
    if ( indexMap == null ) throw new IllegalArgumentException( "You cannot use Select nodes without an index map" );
    final Index index = indexMap.get( node.index.toString() );
    if ( index == null ) throw new NoSuchElementException( "The selected index (" + node.index + ")" + " does not appear in the index map (" + indexMap + ")" );
    curr.push( indexMap.get( node.index.toString() ) );
    return true;
  }
View Full Code Here

    if ( indexMap == null ) throw new IllegalArgumentException( "You cannot use Remap nodes without an index map" );
    final Reference2ReferenceArrayMap<Index, Index> indexInverseRemapping = new Reference2ReferenceArrayMap<Index, Index>( node.indexInverseRemapping.size() );
    for( Map.Entry<String,String> e: node.indexInverseRemapping.entrySet() ) {
      final Index externalIndex = indexMap.get( e.getKey() );
      final Index internalIndex = indexMap.get( e.getValue() );
      if ( internalIndex == null ) throw new NoSuchElementException( "The internal index \"" + e.getValue() + "\" does not appear in the index map (" + indexMap + ")" );
      if ( externalIndex == null ) throw new NoSuchElementException( "The external index \"" + e.getKey() + "\" does not appear in the index map (" + indexMap + ")" );
      indexInverseRemapping.put( externalIndex, internalIndex );
    }
    return new RemappingDocumentIterator( subNode, indexInverseRemapping );
  }
View Full Code Here

   *
   * @return the next document pointer, as cached by {@link #hasNext()}.
   */
  @Deprecated
  public int nextInt() {
    if ( ! hasNext() ) throw new NoSuchElementException();
    last = next;
    next = -1;
    return last;
  }
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.