Class BsonField

java.lang.Object
com.mongodb.client.model.BsonField

public final class BsonField extends Object
A representation of a BSON document field whose value is another BSON document.
Since:
3.1
See Also:
  • Constructor Details

    • BsonField

      public BsonField(String name, Bson value)
      Construct an instance
      Parameters:
      name - the field name
      value - the field value
  • Method Details

    • getName

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

      public Bson getValue()
      Gets the field value
      Returns:
      the field value
    • 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