ExpiresFilter.Duration (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.filters, class: ExpiresFilter, class: Duration

# Class ExpiresFilter.Duration

java.lang.Object
org.apache.catalina.filters.ExpiresFilter.Duration

Enclosing class:
  `ExpiresFilter`

protected static class ExpiresFilter.Duration extends Object
Duration composed of an `amount` and a `unit`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final int`
  `amount`
  `protected final ExpiresFilter.DurationUnit`
  `unit`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Duration(int amount, ExpiresFilter.DurationUnit unit)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getAmount()`
  Returns the magnitude of this duration.
  `ExpiresFilter.DurationUnit`
  `getUnit()`
  Returns the unit of this duration.
  `String`
  `toString()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### amount

    protected final int amount

  - ### unit

    protected final ExpiresFilter.DurationUnit unit

- ## Constructor Details

  - ### Duration

    public Duration(int amount, ExpiresFilter.DurationUnit unit)

- ## Method Details

  - ### getAmount

    public int getAmount()
    Returns the magnitude of this duration.
    Returns:
      the amount

  - ### getUnit

    public ExpiresFilter.DurationUnit getUnit()
    Returns the unit of this duration.
    Returns:
      the unit

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`