Class MongoUnitValue

java.lang.Object
org.mongounit.model.MongoUnitValue

public class MongoUnitValue extends Object
MongoUnitValue class represents the fields and values represented by the special format of the MongoUnit value.
  • Constructor Details

    • MongoUnitValue

      public MongoUnitValue()
      Default constructor.
    • MongoUnitValue

      public MongoUnitValue(String bsonType, Object value, String comparatorValue)
      Constructor.
      Parameters:
      bsonType - BsonType of the MongoUnit value.
      value - Actual value.
      comparatorValue - Comparator value of the MongoUnit value.
  • Method Details

    • builder

      public static MongoUnitValue.MongoUnitValueBuilder builder()
      Returns:
      Instance of the builder pattern version of the MongoUnitValue class.
    • getBsonType

      public String getBsonType()
      Returns:
      BsonType of the MongoUnit value.
    • getValue

      public Object getValue()
      Returns:
      Actual value.
    • getComparatorValue

      public String getComparatorValue()
      Returns:
      Comparator value of the MongoUnit value.
    • setBsonType

      public void setBsonType(String bsonType)
      Parameters:
      bsonType - BsonType of the MongoUnit value.
    • setValue

      public void setValue(Object value)
      Parameters:
      value - Actual value.
    • setComparatorValue

      public void setComparatorValue(String comparatorValue)
      Parameters:
      comparatorValue - Comparator value of the MongoUnit value.
    • equals

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

      protected boolean canEqual(Object other)
      Parameters:
      other - Object to test possible equality with.
      Returns:
      true if 'other' can equal this object based on 'other''s type, false otherwise.
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object