Record Class ExpiresFilter.Duration
java.lang.Object
java.lang.Record
org.apache.catalina.filters.ExpiresFilter.Duration
- Record Components:
amount
- Magnitude of durationunit
- Unit of duration
- Enclosing class:
ExpiresFilter
public static record ExpiresFilter.Duration(int amount, ExpiresFilter.DurationUnit unit)
extends Record
Duration composed of an
amount
and a unit
-
Constructor Summary
ConstructorsConstructorDescriptionDuration
(int amount, ExpiresFilter.DurationUnit unit) Creates an instance of aDuration
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
amount()
Returns the value of theamount
record component.final boolean
Indicates whether some other object is "equal to" this one.int
getUnit()
final int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.unit()
Returns the value of theunit
record component.
-
Constructor Details
-
Method Details
-
getAmount
public int getAmount() -
getUnit
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
amount
-
unit
-