Package org.graylog2.database.filtering
Record Class SingleValueFilter
java.lang.Object
java.lang.Record
org.graylog2.database.filtering.SingleValueFilter
- All Implemented Interfaces:
Filter
-
Constructor Summary
ConstructorsConstructorDescriptionSingleValueFilter(String field, Object value) Creates an instance of aSingleValueFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.inthashCode()Returns a hash code value for this object.org.bson.conversions.BsontoBson()final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
SingleValueFilter
Creates an instance of aSingleValueFilterrecord class.- Parameters:
field- the value for thefieldrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toBson
public org.bson.conversions.Bson toBson() -
toPredicate
- Specified by:
toPredicatein interfaceFilter
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
field
Returns the value of thefieldrecord component. -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-