Class TruncatedArray

java.lang.Object
com.mongodb.client.model.changestream.TruncatedArray

public final class TruncatedArray extends Object
A part of an UpdateDescription object specifying a change to a field of the array type when the change is reported as truncation.
Since:
4.3
  • Constructor Details

    • TruncatedArray

      public TruncatedArray(@BsonProperty("field") String field, @BsonProperty("newSize") int newSize)
      Parameters:
      field - The name of the field that was truncated.
      newSize - The size of the new field value.
  • Method Details

    • getField

      public String getField()
      Returns the name of the truncated field.
      Returns:
      field.
    • getNewSize

      public int getNewSize()
      Returns the size of the new field value.
      Returns:
      newSize.
    • 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