Package com.mongodb.client.model
Class Collation.Builder
- java.lang.Object
-
- com.mongodb.client.model.Collation.Builder
-
- Enclosing class:
- Collation
@NotThreadSafe public static final class Collation.Builder extends Object
A Collation builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collation.Builder
backwardsโ(Boolean backwards)
Sets the backwards valueCollation
build()
Creates a new Collation object with the settings initialised on this builder.Collation.Builder
caseLevelโ(Boolean caseLevel)
Sets the case level valueCollation.Builder
collationAlternateโ(CollationAlternate alternate)
Sets the alternateCollation.Builder
collationCaseFirstโ(CollationCaseFirst caseFirst)
Sets the collation case first valueCollation.Builder
collationMaxVariableโ(CollationMaxVariable maxVariable)
Sets the maxVariableCollation.Builder
collationStrengthโ(CollationStrength strength)
Sets the collation strengthCollation.Builder
localeโ(String locale)
Sets the localeCollation.Builder
normalizationโ(Boolean normalization)
Sets the normalization valueCollation.Builder
numericOrderingโ(Boolean numericOrdering)
Sets the numeric ordering
-
-
-
Method Detail
-
locale
public Collation.Builder localeโ(@Nullable String locale)
Sets the locale- Parameters:
locale
- the locale- Returns:
- this
- See Also:
- ICU User Guide - Locale
-
caseLevel
public Collation.Builder caseLevelโ(@Nullable Boolean caseLevel)
Sets the case level valueTurns on case sensitivity
- Parameters:
caseLevel
- the case level value- Returns:
- this
-
collationCaseFirst
public Collation.Builder collationCaseFirstโ(@Nullable CollationCaseFirst caseFirst)
Sets the collation case first valueDetermines if Uppercase or lowercase values should come first
- Parameters:
caseFirst
- the collation case first value- Returns:
- this
-
collationStrength
public Collation.Builder collationStrengthโ(@Nullable CollationStrength strength)
Sets the collation strength- Parameters:
strength
- the strength- Returns:
- this
-
numericOrdering
public Collation.Builder numericOrderingโ(@Nullable Boolean numericOrdering)
Sets the numeric ordering- Parameters:
numericOrdering
- if true will order numbers based on numerical order and not collation order- Returns:
- this
-
collationAlternate
public Collation.Builder collationAlternateโ(@Nullable CollationAlternate alternate)
Sets the alternateControls whether spaces and punctuation are considered base characters
- Parameters:
alternate
- the alternate- Returns:
- this
-
collationMaxVariable
public Collation.Builder collationMaxVariableโ(@Nullable CollationMaxVariable maxVariable)
Sets the maxVariable- Parameters:
maxVariable
- the maxVariable- Returns:
- this
-
normalization
public Collation.Builder normalizationโ(@Nullable Boolean normalization)
Sets the normalization valueIf true, normalizes text into Unicode NFD.
- Parameters:
normalization
- the normalization value- Returns:
- this
-
backwards
public Collation.Builder backwardsโ(@Nullable Boolean backwards)
Sets the backwards valueCauses secondary differences to be considered in reverse order, as it is done in the French language
- Parameters:
backwards
- the backwards value- Returns:
- this
-
build
public Collation build()
Creates a new Collation object with the settings initialised on this builder.- Returns:
- a new Collation object
-
-