/** * <P> * Returns the next element in the enumeration. If there is no element * left in the enumeration an exception will be thrown. * </P> * * @exception java.util.NoSuchElementException * Thrown if the collection is exhausted. */ @Override public InetAddress nextElement() { if (!hasMoreElements()) throw new NoSuchElementException("End of Range"); InetAddress element = make(m_next); m_next = m_next.add(BigInteger.ONE); return element; }
/** * <P> * Returns true if there are more elements in the iteration. * </P> */ @Override public boolean hasNext() { return hasMoreElements(); }