Package net.ontopia.topicmaps.utils
Class TopicNameGrabber
java.lang.Object
net.ontopia.topicmaps.utils.TopicNameGrabber
- All Implemented Interfaces:
Function<TopicIF,TopicNameIF>
INTERNAL: Grabber that grabs the most appropriate basename from a topic.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Comparator<TopicNameIF>PROTECTED: The comparator used to sort the base names. -
Constructor Summary
ConstructorsConstructorDescriptionTopicNameGrabber(Collection<TopicIF> scope) INTERNAL: Creates a grabber; uses a BaseComparator with the given scope.TopicNameGrabber(Comparator<TopicNameIF> comparator) INTERNAL: Creates a grabber which uses the given comparator. -
Method Summary
Modifier and TypeMethodDescriptionINTERNAL: Grabs the most appropriate base name for the given topic, using the comparator established at creation to compare available base names.
-
Field Details
-
comparator
PROTECTED: The comparator used to sort the base names.
-
-
Constructor Details
-
TopicNameGrabber
INTERNAL: Creates a grabber; uses a BaseComparator with the given scope.- Parameters:
scope- A scope; a collection of TopicIF objects.
-
TopicNameGrabber
INTERNAL: Creates a grabber which uses the given comparator.- Parameters:
comparator- The given comparator
-
-
Method Details
-
apply
INTERNAL: Grabs the most appropriate base name for the given topic, using the comparator established at creation to compare available base names.- Specified by:
applyin interfaceFunction<TopicIF,TopicNameIF> - Parameters:
topic- A topic; formally an Object, but must implement TopicIF.
-