Package org.apache.catalina.filters
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 aDurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.intgetUnit()final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
Method Details
-
getAmount
public int getAmount() -
getUnit
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
unit
Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-