Class SortedCollectionContainerPolicy

All Implemented Interfaces:
Serializable, Cloneable, CoreContainerPolicy<AbstractSession>

public class SortedCollectionContainerPolicy extends CollectionContainerPolicy

Purpose: A SortedCollectionContainerPolicy is ContainerPolicy whose container class implements the SortedInterface interface. Added for BUG # 3233263

Responsibilities: Provide the functionality to operate on an instance of a SortedSet.

See Also:
  • Field Details

    • m_comparator

      protected Comparator m_comparator
    • comparatorClass

      protected Class<?> comparatorClass
    • comparatorClassName

      protected String comparatorClassName
  • Constructor Details

    • SortedCollectionContainerPolicy

      public SortedCollectionContainerPolicy()
      INTERNAL: Construct a new policy.
    • SortedCollectionContainerPolicy

      public SortedCollectionContainerPolicy(Class<?> containerClass)
      INTERNAL: Construct a new policy for the specified class.
    • SortedCollectionContainerPolicy

      public SortedCollectionContainerPolicy(String containerClassName)
      INTERNAL: Construct a new policy for the specified class name.
  • Method Details

    • setComparator

      public void setComparator(Comparator comparator)
      INTERNAL: Sets a comparator object for this policy to use when instantiating a new SortedSet object.
    • setComparatorClass

      public void setComparatorClass(Class<?> comparatorClass)
      INTERNAL: Sets a comparator class for this policy to use when instantiating a new SortedSet object.
    • setComparatorClassName

      public void setComparatorClassName(String comparatorClassName)
      INTERNAL: Sets a comparator class name for this policy to use when instantiating a new SortedSet object.
    • getComparator

      public Comparator getComparator()
      INTERNAL: Return the stored comparator
    • getComparatorClass

      public Class<?> getComparatorClass()
      INTERNAL: Return the stored comparator class
    • getComparatorClassName

      public String getComparatorClassName()
      INTERNAL: return stored comparator class name
    • containerInstance

      public Object containerInstance()
      INTERNAL Override from ContainerPolicy. Need to maintain the comparator in the new instance
      Specified by:
      containerInstance in interface CoreContainerPolicy<AbstractSession>
      Overrides:
      containerInstance in class ContainerPolicy
    • convertClassNamesToClasses

      public void convertClassNamesToClasses(ClassLoader classLoader)
      INTERNAL: Convert all the class-name-based settings in this SortedCollectionContainerPolicy to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
      Overrides:
      convertClassNamesToClasses in class InterfaceContainerPolicy