Package com.mongodb.client.model
Class Field<TExpression>
-
- com.mongodb.client.model.Field<TExpression>
-
- Type Parameters:
TExpression
- the type of the value for the new field
public class Field<TExpression> extends
Helps define new fields for the $addFields pipeline stage- Since:
- 3.4
- MongoDB documentation
- Since server release
-
-
Constructor Summary
Constructors Constructor Description name, TExpression value)
Creates a new field definition for use in $addFields pipeline stages
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
o)
getName()
TExpression
getValue()
int
hashCode()
toString()
-
-
-
Constructor Detail
-
Field
public Field( name, TExpression value)
Creates a new field definition for use in $addFields pipeline stages- Parameters:
name
- the name of the new fieldvalue
- the value of the new field- MongoDB documentation
-
-
Method Detail
-
getName
public getName()
- Returns:
- the name of the new field
-
getValue
public TExpression getValue()
- Returns:
- the value of the new field
-
equals
public boolean equals( o)
- Overrides:
in class
-
hashCode
public int hashCode()
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-