Class Field<TExpression>

java.lang.Object
com.mongodb.client.model.Field<TExpression>
Type Parameters:
TExpression - the type of the value for the new field

public class Field<TExpression> extends Object
Helps define new fields for the $addFields pipeline stage
Since:
3.4
MongoDB documentation
$addFields
Since server release
3.4
  • Constructor Details

    • Field

      public Field(String name, TExpression value)
      Creates a new field definition for use in $addFields pipeline stages
      Parameters:
      name - the name of the new field
      value - the value of the new field
      MongoDB documentation
      $addFields
  • Method Details

    • getName

      public String getName()
      Returns:
      the name of the new field
    • getValue

      public TExpression getValue()
      Returns:
      the value of the new field
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object