SLF4J API
Version 1.4.3

org.slf4j.helpers
Class BasicMarker

java.lang.Object
  extended by org.slf4j.helpers.BasicMarker
All Implemented Interfaces:
Serializable, Marker

public class BasicMarker
extends Object
implements Marker

An almost trivial implementation of the Marker interface.

BasicMarker lets users specify marker information. However, it does not offer any useful operations on that information.

Simple logging systems which ignore marker data, just return instances of this class in order to conform to the SLF4J API.

Author:
Ceki Gülcü
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.slf4j.Marker
ANY_MARKER, ANY_NON_NULL_MARKER
 
Method Summary
 void add(Marker child)
          Add a child Marker to this Marker.
 boolean contains(Marker other)
          Does this marker contain the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is a child of A.
 boolean contains(String name)
          This method is mainly used with Expression Evaluators.
 String getName()
          Get the name of this Marker.
 boolean hasChildren()
          Does this marker have children?
 Iterator iterator()
          Returns an Iterator which can be used to iterate over the children of this marker.
 boolean remove(Marker markerToRemove)
          Remove a child Marker.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public String getName()
Description copied from interface: Marker
Get the name of this Marker.

Specified by:
getName in interface Marker
Returns:
name of marker

add

public void add(Marker child)
Description copied from interface: Marker
Add a child Marker to this Marker.

Specified by:
add in interface Marker
Parameters:
child - a child marker

hasChildren

public boolean hasChildren()
Description copied from interface: Marker
Does this marker have children?

Specified by:
hasChildren in interface Marker
Returns:
true if this marker has children, false otherwise.

iterator

public Iterator iterator()
Description copied from interface: Marker
Returns an Iterator which can be used to iterate over the children of this marker. An empty iterator is returned when this marker has no children.

Specified by:
iterator in interface Marker
Returns:
Iterator over the children of this marker

remove

public boolean remove(Marker markerToRemove)
Description copied from interface: Marker
Remove a child Marker.

Specified by:
remove in interface Marker
Parameters:
markerToRemove - the child Marker to remove
Returns:
true if child could be found and removed, false otherwise.

contains

public boolean contains(Marker other)
Description copied from interface: Marker
Does this marker contain the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is a child of A.

Specified by:
contains in interface Marker
Parameters:
other - The marker to test for inclusion.
Returns:
Whether this marker contains the other marker.

contains

public boolean contains(String name)
This method is mainly used with Expression Evaluators.

Specified by:
contains in interface Marker
Returns:
Whether this marker contains the other marker.

toString

public String toString()
Overrides:
toString in class Object

SLF4J API
Version 1.4.3

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