Class BucketOptions


  • public class BucketOptions
    extends 
    The options for a $bucket aggregation pipeline stage
    Since:
    3.4
    MongoDB documentation
    Since server release
    • Constructor Detail

      • BucketOptions

        public BucketOptions()
    • 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
      • getOutput

        @Nullable
        public <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 <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