SubstitutionGuard

constructor(minTokens: Int = DEFAULT_MIN_TOKENS, stopwords: Set<String> = Vocabulary.STOPWORDS, units: Map<String, MeasurementUnit> = Vocabulary.UNITS, maxTokens: Int? = null)

The guard as it has always been constructed: one floor, applied wherever the difference sits.

Kept as the only public constructor so that the head floor could be added without changing a signature somebody has already compiled against. Reach it through withHeadFloor.


constructor()

The defaults, as a constructor a caller can already have compiled against.

Spelled out because a secondary constructor whose parameters all have defaults does not get the no-argument overload a primary one gets, and dropping it would break new SubstitutionGuard() for a Java caller who never asked for any of this.