Record Class Table.Metrics
java.lang.Object
java.lang.Record
algorithm.Table.Metrics
- Enclosing class:
Table
public static record Table.Metrics(long softCollisions, long hardCollisions, long timesRetrieved, long numStored, int keySize, boolean riskySaving)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMetrics(long softCollisions, long hardCollisions, long timesRetrieved, long numStored, int keySize, boolean riskySaving) Creates an instance of aMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thehardCollisionsrecord component.final inthashCode()Returns a hash code value for this object.intkeySize()Returns the value of thekeySizerecord component.longReturns the value of thenumStoredrecord component.booleanReturns the value of theriskySavingrecord component.longReturns the value of thesoftCollisionsrecord component.longReturns the value of thetimesRetrievedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Metrics
public Metrics(long softCollisions, long hardCollisions, long timesRetrieved, long numStored, int keySize, boolean riskySaving) Creates an instance of aMetricsrecord class.- Parameters:
softCollisions- the value for thesoftCollisionsrecord componenthardCollisions- the value for thehardCollisionsrecord componenttimesRetrieved- the value for thetimesRetrievedrecord componentnumStored- the value for thenumStoredrecord componentkeySize- the value for thekeySizerecord componentriskySaving- the value for theriskySavingrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
softCollisions
public long softCollisions()Returns the value of thesoftCollisionsrecord component.- Returns:
- the value of the
softCollisionsrecord component
-
hardCollisions
public long hardCollisions()Returns the value of thehardCollisionsrecord component.- Returns:
- the value of the
hardCollisionsrecord component
-
timesRetrieved
public long timesRetrieved()Returns the value of thetimesRetrievedrecord component.- Returns:
- the value of the
timesRetrievedrecord component
-
numStored
public long numStored()Returns the value of thenumStoredrecord component.- Returns:
- the value of the
numStoredrecord component
-
keySize
public int keySize()Returns the value of thekeySizerecord component.- Returns:
- the value of the
keySizerecord component
-
riskySaving
public boolean riskySaving()Returns the value of theriskySavingrecord component.- Returns:
- the value of the
riskySavingrecord component
-