ch.qos.logback.core.joran.spi
Class ElementSelector

java.lang.Object
  extended by ch.qos.logback.core.joran.spi.ElementPath
      extended by 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
ElementSelector()
           
ElementSelector(List<String> list)
           
ElementSelector(String p)
          Build an elementPath from a string.
 
Method Summary
 boolean equals(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(List<String> list)

ElementSelector

public ElementSelector(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(Object o)
Overrides:
equals in class ElementPath

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2005-2014 QOS.ch. All Rights Reserved.