driver-core/src/main/com/mongodb/client/model/Aggregates.java
public static <TExpression, Boundary> Bson bucket(final TExpression groupBy, final List<Boundary> boundaries) {
        return bucket(groupBy, boundaries, new BucketOptions());
    }
public static <TExpression, Boundary> Bson bucket(final TExpression groupBy, final List<Boundary> boundaries) {
        return bucket(groupBy, boundaries, new BucketOptions());
    }
public static < TExpression , Boundary > Bson bucket ( final TExpression groupBy , final List < Boundary > boundaries ) { return bucket ( groupBy , boundaries , new BucketOptions ( ) ) ; }
Creates a $bucket pipeline stage

@param <TExpression> the groupBy expression type
@param <Boundary>    the boundary type
@param groupBy       the criteria to group By
@param boundaries    the boundaries of the buckets
@return the $bucket pipeline stage
@mongodb.driver.manual reference/operator/aggregation/bucket/ $bucket
@mongodb.server.release 3.4
@since 3.4
Creates a $bucket pipeline stage