Package org.nuxeo.common.utils
Record Class ByteSize.SimpleFormatter
java.lang.Object
java.lang.Record
org.nuxeo.common.utils.ByteSize.SimpleFormatter
- All Implemented Interfaces:
ByteSize.Formatter
- Enclosing class:
- ByteSize
-
Field Summary
Fields inherited from interface org.nuxeo.common.utils.ByteSize.Formatter
INTERNATIONAL_SYSTEM_UNIT, JVM_HEAP_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteUnit()Returns the value of thebyteUnitrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegibibyteUnitrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thekibibyteUnitrecord component.Returns the value of themebibyteUnitrecord component.Returns the value of thepebibyteUnitrecord component.Returns the value of thetebibyteUnitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleFormatter
public SimpleFormatter(String byteUnit, String kibibyteUnit, String mebibyteUnit, String gibibyteUnit, String tebibyteUnit, String pebibyteUnit) Creates an instance of aSimpleFormatterrecord class.- Parameters:
byteUnit- the value for thebyteUnitrecord componentkibibyteUnit- the value for thekibibyteUnitrecord componentmebibyteUnit- the value for themebibyteUnitrecord componentgibibyteUnit- the value for thegibibyteUnitrecord componenttebibyteUnit- the value for thetebibyteUnitrecord componentpebibyteUnit- the value for thepebibyteUnitrecord component
-
-
Method Details
-
format
- Specified by:
formatin interfaceByteSize.Formatter
-
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). -
byteUnit
Returns the value of thebyteUnitrecord component.- Returns:
- the value of the
byteUnitrecord component
-
kibibyteUnit
Returns the value of thekibibyteUnitrecord component.- Returns:
- the value of the
kibibyteUnitrecord component
-
mebibyteUnit
Returns the value of themebibyteUnitrecord component.- Returns:
- the value of the
mebibyteUnitrecord component
-
gibibyteUnit
Returns the value of thegibibyteUnitrecord component.- Returns:
- the value of the
gibibyteUnitrecord component
-
tebibyteUnit
Returns the value of thetebibyteUnitrecord component.- Returns:
- the value of the
tebibyteUnitrecord component
-
pebibyteUnit
Returns the value of thepebibyteUnitrecord component.- Returns:
- the value of the
pebibyteUnitrecord component
-