Class SimpleNameSpace

    • Field Detail

      • factory

        protected final SimpleNameFactory factory
        The factory to use for creating name instances in this namespace.
    • Constructor Detail

      • SimpleNameSpace

        public SimpleNameSpace​(SimpleNameSpace parent,
                               String name)
                        throws InvalidNameException
        Creates a new instance for the given parent namespace and name. The new instance will share the factory instance from its parent, unless parent is null in which case the default factory will be used.
        Parameters:
        parent - the parent of the new namespace, or null if none.
        name - the identifier of this namespace.
        Throws:
        InvalidNameException - if the given name violates the JNDI syntax.
      • SimpleNameSpace

        public SimpleNameSpace​(SimpleNameSpace parent,
                               Name name)
                        throws InvalidNameException
        Creates a new instance for the given parent namespace and name. The new instance will share the factory instance from its parent, unless parent is null in which case the default factory will be used.
        Parameters:
        parent - the parent of the new namespace, or null if none.
        name - the identifier of this namespace.
        Throws:
        InvalidNameException - if the given name violates the JNDI syntax.
    • Method Detail

      • isGlobal

        public boolean isGlobal()
        Indicates whether this namespace is a "top level" namespace. Global, or top-level namespaces are not contained within another namespace. The global namespace has no parent.
        Specified by:
        isGlobal in interface NameSpace
        Returns:
        true if this namespace has no parent.
      • toString

        public String toString()
        Returns a string representation of this namespace.
        Overrides:
        toString in class Object
        Returns:
        a string representation of this name.
      • equals

        public boolean equals​(Object other)
        Compares the given object to this namespace for equality.
        Overrides:
        equals in class Object
        Parameters:
        other - The other object to compare to this namespace.
      • hashCode

        public int hashCode()
        Returns a hash code value for this namespace.
        Overrides:
        hashCode in class Object