Class BsonField


  • public final class BsonField
    extends java.lang.Object
    A representation of a BSON document field whose value is another BSON document.
    Since:
    3.1
    See Also:
    Aggregates.group(Object, BsonField...)
    • Constructor Summary

      Constructors 
      Constructor Description
      BsonField​(java.lang.String name, Bson value)
      Construct an instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Gets the field name
      Bson getValue()
      Gets the field value
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BsonField

        public BsonField​(java.lang.String name,
                         Bson value)
        Construct an instance
        Parameters:
        name - the field name
        value - the field value
    • Method Detail

      • getName

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

        public Bson getValue()
        Gets the field value
        Returns:
        the field value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object