Package com.mongodb.client.model
Class BucketOptions
- java.lang.Object
-
- com.mongodb.client.model.BucketOptions
-
public class BucketOptions extends java.lang.Object
The options for a $bucket aggregation pipeline stage- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description BucketOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketOptions
defaultBucket(java.lang.Object name)
The name of the default bucket for values outside the defined bucketsjava.lang.Object
getDefaultBucket()
java.util.List<BsonField>
getOutput()
BucketOptions
output(BsonField... output)
The definition of the output document in each bucketBucketOptions
output(java.util.List<BsonField> output)
The definition of the output document in each bucketjava.lang.String
toString()
-
-
-
Method Detail
-
defaultBucket
public BucketOptions defaultBucket(@Nullable java.lang.Object name)
The name of the default bucket for values outside the defined buckets- Parameters:
name
- the bucket value- Returns:
- this
-
getDefaultBucket
@Nullable public java.lang.Object getDefaultBucket()
- Returns:
- the default bucket value
-
getOutput
@Nullable public java.util.List<BsonField> getOutput()
- Returns:
- the output document definition
-
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 BucketOptions output(java.util.List<BsonField> output)
The definition of the output document in each bucket- Parameters:
output
- the output document definition- Returns:
- this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-