Class DefaultNamingEnumeration

java.lang.Object
cloud.piranha.naming.impl.DefaultNamingEnumeration
All Implemented Interfaces:
java.util.Enumeration<javax.naming.NameClassPair>, javax.naming.NamingEnumeration<javax.naming.NameClassPair>

public class DefaultNamingEnumeration
extends java.lang.Object
implements javax.naming.NamingEnumeration<javax.naming.NameClassPair>
The default NamingEnumeration.
Author:
Manfred Riem ([email protected])
  • Constructor Summary

    Constructors
    Constructor Description
    DefaultNamingEnumeration​(java.util.Collection<javax.naming.NameClassPair> nameClassPairs)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void close()
    Close the enumeration.
    boolean hasMore()
    Do we have more elements?
    boolean hasMoreElements()
    Do we have more elements?
    javax.naming.NameClassPair next()
    Get the next element.
    javax.naming.NameClassPair nextElement()
    Get the next element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Enumeration

    asIterator
  • Constructor Details

    • DefaultNamingEnumeration

      public DefaultNamingEnumeration​(java.util.Collection<javax.naming.NameClassPair> nameClassPairs)
      Constructor.
      Parameters:
      nameClassPairs - the name class pairs.
  • Method Details

    • close

      public void close() throws javax.naming.NamingException
      Close the enumeration.
      Specified by:
      close in interface javax.naming.NamingEnumeration<javax.naming.NameClassPair>
      Throws:
      javax.naming.NamingException - when a naming error occurs.
    • hasMore

      public boolean hasMore() throws javax.naming.NamingException
      Do we have more elements?
      Specified by:
      hasMore in interface javax.naming.NamingEnumeration<javax.naming.NameClassPair>
      Returns:
      true if we do, false otherwise.
      Throws:
      javax.naming.NamingException - when a naming error occurs.
    • hasMoreElements

      public boolean hasMoreElements()
      Do we have more elements?
      Specified by:
      hasMoreElements in interface java.util.Enumeration<javax.naming.NameClassPair>
      Returns:
      true if we do, false otherwise.
    • next

      public javax.naming.NameClassPair next() throws javax.naming.NamingException
      Get the next element.
      Specified by:
      next in interface javax.naming.NamingEnumeration<javax.naming.NameClassPair>
      Returns:
      the next element.
      Throws:
      javax.naming.NamingException - when a naming error occurs.
    • nextElement

      public javax.naming.NameClassPair nextElement()
      Get the next element.
      Specified by:
      nextElement in interface java.util.Enumeration<javax.naming.NameClassPair>
      Returns:
      the next element.