Record Class Capacity
java.lang.Object
java.lang.Record
com.nimbusds.infinispan.persistence.dynamodb.config.Capacity
Capacity specified as absolute value or percentage.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.measure()
Returns the value of themeasure
record component.static Capacity
Parses a capacity from the specified string.toString()
Returns a string representation of this record class.double
value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Capacity
Creates a new capacity.- Parameters:
value
- The value. Must be positive.measure
- The measure. Must not benull
.
-
-
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. -
parse
Parses a capacity from the specified string.- Parameters:
s
- The string. Must not benull
.- Returns:
- The parsed capacity.
- Throws:
NumberFormatException
- If parsing failed.
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
measure
Returns the value of themeasure
record component.- Returns:
- the value of the
measure
record component
-