DefaultCanonicalNameSelector

Default com.embabel.dice.common.CanonicalNameSelector. Stateless, thread-safe, side-effect free — exposed as an object so callers can use it directly without Spring DI when that's the right shape.

Functions

Link copied to clipboard
open fun select(vararg candidates: String?): String?

Convenience varargs overload — same semantics as select.

open override fun select(candidates: Collection<String?>): String?

Pick the best canonical name from candidates. Inputs are normalized via NormalizedNameCandidateSearcher.normalizeName before scoring so titles ("Dr.", "Mr.") and suffixes ("Jr.") don't artificially boost. Blank, null, and effectively-identical candidates are deduped.