Interface CoreContainerPolicy<ABSTRACT_SESSION extends CoreAbstractSession>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean addInto​(java.lang.Object element, java.lang.Object container, ABSTRACT_SESSION session)
      INTERNAL: Add element to container.
      boolean addInto​(java.lang.Object key, java.lang.Object element, java.lang.Object container, ABSTRACT_SESSION session)
      INTERNAL: Add element to container.
      void clear​(java.lang.Object container)
      INTERNAL: Remove all the elements from the specified container.
      java.lang.Object containerInstance()
      INTERNAL: Return an instance of the container class.
      java.lang.Object containerInstance​(int initialCapacity)
      INTERNAL: Return an instance of the container class with the specified initial capacity.
      boolean contains​(java.lang.Object element, java.lang.Object container, ABSTRACT_SESSION session)
      INTERNAL: Check if the object is contained in the collection.
      boolean hasNext​(java.lang.Object iterator)
      INTERNAL: Return whether the iterator has more objects.
      boolean isEmpty​(java.lang.Object container)
      INTERNAL: Return whether the container is empty.
      boolean isListPolicy()  
      java.lang.Object iteratorFor​(java.lang.Object container)
      INTERNAL: Return an iterator for the given container.
      java.lang.Object next​(java.lang.Object iterator, ABSTRACT_SESSION session)
      INTERNAL: Return the next object from the iterator.
      java.lang.Object nextEntry​(java.lang.Object iterator)
      INTERNAL: Return the next object on the queue.
      java.lang.Object nextEntry​(java.lang.Object iterator, ABSTRACT_SESSION session)
      INTERNAL: Return the next object on the queue.
      boolean removeFrom​(java.lang.Object element, java.lang.Object container, ABSTRACT_SESSION session)
      INTERNAL: Remove the object from the collection.
      void setContainerClass​(java.lang.Class containerClass)
      INTERNAL: Set the class used for the container.
      int sizeFor​(java.lang.Object container)
      INTERNAL: Return the size of container.
      java.util.Vector vectorFor​(java.lang.Object container, ABSTRACT_SESSION session)
      INTERNAL: Return a Vector populated with the contents of container.
    • Method Detail

      • addInto

        boolean addInto​(java.lang.Object element,
                        java.lang.Object container,
                        ABSTRACT_SESSION session)
        INTERNAL: Add element to container. This is used to add to a collection independent of JDK 1.1 and 1.2. The session may be required to wrap for the wrapper policy. Return whether the container changed
      • addInto

        boolean addInto​(java.lang.Object key,
                        java.lang.Object element,
                        java.lang.Object container,
                        ABSTRACT_SESSION session)
        INTERNAL: Add element to container. This is used to add to a collection independent of type. The session may be required to wrap for the wrapper policy. Return whether the container changed.
      • clear

        void clear​(java.lang.Object container)
        INTERNAL: Remove all the elements from the specified container. Valid only for certain subclasses.
      • containerInstance

        java.lang.Object containerInstance()
        INTERNAL: Return an instance of the container class. Null should never be returned. A ValidationException is thrown on error.
      • contains

        boolean contains​(java.lang.Object element,
                         java.lang.Object container,
                         ABSTRACT_SESSION session)
        INTERNAL: Check if the object is contained in the collection. This is used to check contains in a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.
      • hasNext

        boolean hasNext​(java.lang.Object iterator)
        INTERNAL: Return whether the iterator has more objects. The iterator is the one returned from #iteratorFor(). Valid for some subclasses only.
        See Also:
        ContainerPolicy#iteratorFor(java.lang.Object)
      • isEmpty

        boolean isEmpty​(java.lang.Object container)
        INTERNAL: Return whether the container is empty.
      • isListPolicy

        boolean isListPolicy()
      • iteratorFor

        java.lang.Object iteratorFor​(java.lang.Object container)
        INTERNAL: Return an iterator for the given container. This iterator can then be used as a parameter to #hasNext() and #next().
        See Also:
        ContainerPolicy#hasNext(java.lang.Object), ContainerPolicy#next(java.lang.Object)
      • next

        java.lang.Object next​(java.lang.Object iterator,
                              ABSTRACT_SESSION session)
        INTERNAL: Return the next object from the iterator. This is used to stream over a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.
      • nextEntry

        java.lang.Object nextEntry​(java.lang.Object iterator)
        INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). In the case of a Map, this will return a MapEntry to allow use of the key
        See Also:
        ContainerPolicy#iteratorFor(java.lang.Object)
      • nextEntry

        java.lang.Object nextEntry​(java.lang.Object iterator,
                                   ABSTRACT_SESSION session)
        INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). In the case of a Map, this will return a MapEntry to allow use of the key
        See Also:
        ContainerPolicy#iteratorFor(Object iterator, AbstractSession session)
      • removeFrom

        boolean removeFrom​(java.lang.Object element,
                           java.lang.Object container,
                           ABSTRACT_SESSION session)
        INTERNAL: Remove the object from the collection. This is used to remove from a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.
      • setContainerClass

        void setContainerClass​(java.lang.Class containerClass)
        INTERNAL: Set the class used for the container.
      • sizeFor

        int sizeFor​(java.lang.Object container)
        INTERNAL: Return the size of container.
      • vectorFor

        java.util.Vector vectorFor​(java.lang.Object container,
                                   ABSTRACT_SESSION session)
        INTERNAL: Return a Vector populated with the contents of container. Added for bug 2766379, must implement a version of vectorFor that handles wrapped objects.
      • containerInstance

        java.lang.Object containerInstance​(int initialCapacity)
        INTERNAL: Return an instance of the container class with the specified initial capacity. Null should never be returned. A ValidationException is thrown on error.