Class ContextBindings

  • All Implemented Interfaces:
    Enumeration, NamingEnumeration
    Direct Known Subclasses:
    ContextNames

    public class ContextBindings
    extends Object
    implements NamingEnumeration
    This class represents a NamingEnumeration of the bindings of a Context. Originally authored by Henri Yandell and modified to make more flexable with other Context implementations.
    Version:
    $Rev: 1983 $ $Date: 2005-09-03 07:03:38 -0700 (Sat, 03 Sep 2005) $
    Author:
    Robert M. Zigweid and Henri Yandell
    • Constructor Detail

      • ContextBindings

        public ContextBindings​(Map table)
        Creates a ContextBindings object based upon an a Map of names and the objects the names are bound to. If table is modified after instantiation of ContextBindings, behavior is undefined and should be considered invalid.
        Parameters:
        table - The table upon which the ContextBindings is based.
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Returns true if there are more elements available, otherwise false.
        Specified by:
        hasMoreElements in interface Enumeration
        Returns:
        true if there are more elements available, otherwise false
      • hasMore

        public boolean hasMore()
                        throws NamingException
        Returns true if there are more elements available, otherwise false.
        Specified by:
        hasMore in interface NamingEnumeration
        Returns:
        true if there are more elements available, otherwise false
        Throws:
        NamingException - if a naming exception is encountered
      • nextElement

        public Object nextElement()
        Returns a Binding created from the next available name.
        Specified by:
        nextElement in interface Enumeration
        Returns:
        a Binding representing the binding of the name and the object bound to the name
      • close

        public void close()
        Close the ContextBindings instance, rendering it inoperable.
        Specified by:
        close in interface NamingEnumeration