Package com.mongodb.client.model
Class BucketOptions
-
- com.mongodb.client.model.BucketOptions
-
public class BucketOptions extends
The options for a $bucket aggregation pipeline stage- Since:
- 3.4
- MongoDB documentation
- Since server release
-
-
Constructor Summary
Constructors Constructor Description BucketOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketOptions
name)
The name of the default bucket for values outside the defined bucketsboolean
o)
getDefaultBucket()
<BsonField>
getOutput()
int
hashCode()
BucketOptions
output(BsonField... output)
The definition of the output document in each bucketBucketOptions
<BsonField> output)
The definition of the output document in each buckettoString()
-
-
-
Method Detail
-
defaultBucket
public BucketOptions defaultBucket(@Nullable name)
The name of the default bucket for values outside the defined buckets- Parameters:
name
- the bucket value- Returns:
- this
-
getDefaultBucket
@Nullable public getDefaultBucket()
- Returns:
- the default bucket value
-
output
public BucketOptions output(BsonField... output)
The definition of the output document in each bucket- Parameters:
output
- the output document definition- Returns:
- this
-
output
public <BsonField> output)
The definition of the output document in each bucket- Parameters:
output
- the output document definition- Returns:
- this
-
equals
public boolean equals( o)
- Overrides:
in class
-
hashCode
public int hashCode()
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-