/** * <P> * Returns an Iterator object that can be used to step through all the * address encapsulated in the object. * </P> * * <P> * The iterator returns objects of type * {@link java.net.InetAddress InetAddress}or <code>null</code> if the * address is unknown. * </p> * * @see java.net.InetAddress * @return a {@link java.util.Iterator} object. */ @Override public Iterator<InetAddress> iterator() { return new IPAddressRangeGenerator(m_begin, m_end); }
/** * <P> * Returns an Enumeration object that can be used to list out all the * address contained in the encapsulated range. * </P> * * <P> * The iterator returns objects of type * {@link java.net.InetAddress InetAddress}or <code>null</code> if the * address is unknown. * </p> * * @see java.net.InetAddress */ Enumeration<InetAddress> elements() { return new IPAddressRangeGenerator(m_begin, m_end); }