Package ch.qos.logback.core.joran.spi

## Class ElementSelector

- java.lang.Object
- - ch.qos.logback.core.joran.spi.ElementPath
  - - ch.qos.logback.core.joran.spi.ElementSelector

    public class ElementSelector
    extends ElementPath

ElementSelector extends `ElementPath` with matching operations such as `fullPathMatch(ElementPath)`, `getPrefixMatchLength(ElementPath)` and `getTailMatchLength(ElementPath)`.

Parts of the path may contain '*' for wildcard matching.

Since:
  1.1.0
Author:
  Ceki Gülcü

### Constructor Summary

Constructors
`ElementSelector()`
`ElementSelector​(java.lang.String p)` Build an elementPath from a string.
`ElementSelector​(java.util.List<java.lang.String> list)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object o)`
`boolean` `fullPathMatch​(ElementPath path)`
`int` `getPrefixMatchLength​(ElementPath p)` Returns the number of "prefix" components that this pattern has in common with the pattern p passed as parameter.
`int` `getTailMatchLength​(ElementPath p)` Returns the number of "tail" components that this pattern has in common with the pattern p passed as parameter.
`int` `hashCode()`
`boolean` `isContainedIn​(ElementPath p)`

### Methods inherited from class ch.qos.logback.core.joran.spi.ElementPath

`duplicate, get, getCopyOfPartList, peekLast, pop, push, size, toStableString, toString`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### ElementSelector

    public ElementSelector()

#### ElementSelector

    public ElementSelector​(java.util.List<java.lang.String> list)

#### ElementSelector

    public ElementSelector​(java.lang.String p)

Build an elementPath from a string. Note that "/x" is considered equivalent to "x" and to "x/"

### Method Detail

#### fullPathMatch

    public boolean fullPathMatch​(ElementPath path)

#### getTailMatchLength

    public int getTailMatchLength​(ElementPath p)

Returns the number of "tail" components that this pattern has in common with the pattern p passed as parameter. By "tail" components we mean the components at the end of the pattern.

#### isContainedIn

    public boolean isContainedIn​(ElementPath p)

#### getPrefixMatchLength

    public int getPrefixMatchLength​(ElementPath p)

Returns the number of "prefix" components that this pattern has in common with the pattern p passed as parameter. By "prefix" components we mean the components at the beginning of the pattern.

#### equals

    public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `ElementPath`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`