Package com.mongodb.client.model
Class Collation
java.lang.Object
com.mongodb.client.model.Collation
The options regarding collation support in MongoDB 3.4+
- Since:
- 3.4
- MongoDB documentation
- Create Collection
- Index options
- Since server release
- 3.4
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets this collation options as a document.static Collation.Builder
builder()
Convenience method to create a Builder.static Collation.Builder
Convenience method to create a from an existingCollation
.boolean
Returns the collation alternateReturns the backwards valueReturns the collation case first valueReturns the case level valueReturns the localeReturns the maxVariableReturns the normalization valueReturns the numeric ordering, if true will order numbers based on numerical order and not collation order.Returns the collation strengthint
hashCode()
toString()
-
Method Details
-
builder
Convenience method to create a Builder.- Returns:
- a builder
-
builder
Convenience method to create a from an existingCollation
.- Parameters:
options
- create a builder from existing options- Returns:
- a builder
-
getLocale
Returns the locale- Returns:
- the locale
- See Also:
-
getCaseLevel
Returns the case level value- Returns:
- the case level value
-
getCaseFirst
Returns the collation case first value- Returns:
- the collation case first value
-
getStrength
Returns the collation strength- Returns:
- the collation strength
-
getNumericOrdering
Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.- Returns:
- the numeric ordering
-
getAlternate
Returns the collation alternate- Returns:
- the alternate
-
getMaxVariable
Returns the maxVariableControls which characters are affected by collection alternate
CollationAlternate.SHIFTED
.- Returns:
- the maxVariable
-
getNormalization
Returns the normalization valueIf true, normalizes text into Unicode NFD.
- Returns:
- the normalization
-
getBackwards
Returns the backwards value- Returns:
- the backwards value
-
asDocument
Gets this collation options as a document.- Returns:
- The collation options as a BsonDocument
-
equals
-
hashCode
public int hashCode() -
toString
-