Record Class DerivedUnit
java.lang.Object
java.lang.Record
org.graylog.plugins.formatting.units.model.DerivedUnit
- All Implemented Interfaces:
Unit
-
Field Summary
FieldsFields inherited from interface org.graylog.plugins.formatting.units.model.Unit
ABBREVIATION, NAME, UNIT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionDerivedUnit(String abbrev, String name, String unitType, Conversion conversion) Creates an instance of aDerivedUnitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionabbrev()Returns the value of theabbrevrecord component.Returns the value of theconversionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.unitType()Returns the value of theunitTyperecord component.
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
DerivedUnit
Creates an instance of aDerivedUnitrecord class.- Parameters:
abbrev- the value for theabbrevrecord componentname- the value for thenamerecord componentunitType- the value for theunitTyperecord componentconversion- the value for theconversionrecord component
-
-
Method Details
-
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). -
abbrev
Returns the value of theabbrevrecord component. -
name
Returns the value of thenamerecord component. -
unitType
Returns the value of theunitTyperecord component. -
conversion
Returns the value of theconversionrecord component.- Returns:
- the value of the
conversionrecord component
-