Class TopicNameGrabber

    • Field Detail

      • comparator

        protected Comparator<TopicNameIF> comparator
        PROTECTED: The comparator used to sort the base names.
    • Constructor Detail

      • TopicNameGrabber

        public TopicNameGrabber​(Collection<TopicIF> scope)
        INTERNAL: Creates a grabber; uses a BaseComparator with the given scope.
        Parameters:
        scope - A scope; a collection of TopicIF objects.
      • TopicNameGrabber

        public TopicNameGrabber​(Comparator<TopicNameIF> comparator)
        INTERNAL: Creates a grabber which uses the given comparator.
        Parameters:
        comparator - The given comparator
    • Method Detail

      • apply

        public TopicNameIF apply​(TopicIF topic)
        INTERNAL: Grabs the most appropriate base name for the given topic, using the comparator established at creation to compare available base names.
        Specified by:
        apply in interface Function<TopicIF,​TopicNameIF>
        Parameters:
        topic - A topic; formally an Object, but must implement TopicIF.