public class ContextNameGrabber extends Object implements Function<TopicIF,NameIF>
Modifier and Type | Field and Description |
---|---|
protected Comparator<TopicNameIF> |
bnComparator |
protected Comparator<VariantNameIF> |
vnComparator |
protected Predicate<VariantNameIF> |
within |
Constructor and Description |
---|
ContextNameGrabber(Collection<TopicIF> baseNameContext,
Collection<TopicIF> variantNameContext)
INTERNAL: Creates a grabber; makes the comparators ScopedIFComparator
for the given scopes.
|
Modifier and Type | Method and Description |
---|---|
NameIF |
apply(TopicIF mytopic)
INTERNAL: Grabs the most appropriate base name for the given topic,
using the comparator established at creation to compare available
base names and if a sort variant is available it will be used.
|
protected Predicate<VariantNameIF> within
protected Comparator<TopicNameIF> bnComparator
protected Comparator<VariantNameIF> vnComparator
public ContextNameGrabber(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantNameContext)
baseNameContext
- basename scope;
a collection of TopicIF objects.variantNameContext
- variantname scope;
a collection of TopicIF objects.