Mapper.ContextList (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.catalina.mapper, class: Mapper, class: ContextList

# Class Mapper.ContextList

java.lang.Object
org.apache.catalina.mapper.Mapper.ContextList

Enclosing class:
  `Mapper`

protected static final class Mapper.ContextList extends Object
List of mapped contexts.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final Mapper.MappedContext[]`
  `contexts`
  The array of mapped contexts.
  `final int`
  `nesting`
  The nesting level.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContextList()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Mapper.ContextList`
  `addContext(Mapper.MappedContext mappedContext, int slashCount)`
  Add a context to the list.
  `Mapper.ContextList`
  `removeContext(String path)`
  Remove a context from the list.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### contexts

    public final Mapper.MappedContext[] contexts
    The array of mapped contexts.

  - ### nesting

    public final int nesting
    The nesting level.

- ## Constructor Details

  - ### ContextList

    public ContextList()
    Default constructor.

- ## Method Details

  - ### addContext

    public Mapper.ContextList addContext(Mapper.MappedContext mappedContext, int slashCount)
    Add a context to the list.
    Parameters:
      `mappedContext` - The context to add
      `slashCount` - The number of slashes in the path
    Returns:
      the new ContextList or null if failed

  - ### removeContext

    public Mapper.ContextList removeContext(String path)
    Remove a context from the list.
    Parameters:
      `path` - The path of the context to remove
    Returns:
      the new ContextList or null if failed