Package com.mongodb.client.model
Class Collation
-
- com.mongodb.client.model.Collation
-
public final class Collation extends
The options regarding collation support in MongoDB 3.4+- Since:
- 3.4
- MongoDB documentation
- Since server release
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Collation.Builder
A Collation builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BsonDocument
asDocument()
Gets this collation options as a document.static Collation.Builder
builder()
Convenience method to create a Builder.static Collation.Builder
builder(Collation options)
Convenience method to create a from an existingCollation
.boolean
o)
CollationAlternate
getAlternate()
Returns the collation alternategetBackwards()
Returns the backwards valueCollationCaseFirst
getCaseFirst()
Returns the collation case first valuegetCaseLevel()
Returns the case level valuegetLocale()
Returns the localeCollationMaxVariable
getMaxVariable()
Returns the maxVariablegetNormalization()
Returns the normalization valuegetNumericOrdering()
Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.CollationStrength
getStrength()
Returns the collation strengthint
hashCode()
toString()
-
-
-
Method Detail
-
builder
public static Collation.Builder builder()
Convenience method to create a Builder.- Returns:
- a builder
-
builder
public static Collation.Builder builder(Collation options)
Convenience method to create a from an existingCollation
.- Parameters:
options
- create a builder from existing options- Returns:
- a builder
-
getLocale
@Nullable public getLocale()
Returns the locale- Returns:
- the locale
- See Also:
-
getCaseLevel
@Nullable public getCaseLevel()
Returns the case level value- Returns:
- the case level value
-
getCaseFirst
@Nullable public CollationCaseFirst getCaseFirst()
Returns the collation case first value- Returns:
- the collation case first value
-
getStrength
@Nullable public CollationStrength getStrength()
Returns the collation strength- Returns:
- the collation strength
-
getNumericOrdering
@Nullable public getNumericOrdering()
Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.- Returns:
- the numeric ordering
-
getAlternate
@Nullable public CollationAlternate getAlternate()
Returns the collation alternate- Returns:
- the alternate
-
getMaxVariable
@Nullable public CollationMaxVariable getMaxVariable()
Returns the maxVariableControls which characters are affected by collection alternate
CollationAlternate.SHIFTED
.- Returns:
- the maxVariable
-
getNormalization
@Nullable public getNormalization()
Returns the normalization valueIf true, normalizes text into Unicode NFD.
- Returns:
- the normalization
-
getBackwards
@Nullable public getBackwards()
Returns the backwards value- Returns:
- the backwards value
-
asDocument
public BsonDocument asDocument()
Gets this collation options as a document.- Returns:
- The collation options as a BsonDocument
-
equals
public boolean equals( o)
- Overrides:
in class
-
hashCode
public int hashCode()
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-