Record Class Metric
java.lang.Object
java.lang.Record
org.graylog.plugins.views.search.rest.scriptingapi.request.Metric
- All Implemented Interfaces:
Sortable
public record Metric(@Valid String fieldName, @Valid String functionName, SortSpec.Direction sort)
extends Record
implements Sortable
-
Constructor Summary
ConstructorDescriptionMetric
(@Valid String fieldName, @Valid String functionName, SortSpec.Direction sort) Creates an instance of aMetric
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@Valid String
Returns the value of thefieldName
record component.@Valid String
Returns the value of thefunctionName
record component.final int
hashCode()
Returns a hash code value for this object.sort()
Returns the value of thesort
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Metric
public Metric(@Valid @Valid String fieldName, @Valid @Valid String functionName, SortSpec.Direction sort) Creates an instance of aMetric
record class.- Parameters:
fieldName
- the value for thefieldName
record componentfunctionName
- the value for thefunctionName
record componentsort
- the value for thesort
record component
-
-
Method Details
-
sortColumnName
- Specified by:
sortColumnName
in interfaceSortable
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
fieldName
Returns the value of thefieldName
record component.- Returns:
- the value of the
fieldName
record component
-
functionName
Returns the value of thefunctionName
record component.- Returns:
- the value of the
functionName
record component
-
sort
Returns the value of thesort
record component.
-