Package org.slf4j.helpers
Class BasicMarker
- java.lang.Object
-
- org.slf4j.helpers.BasicMarker
-
- All Implemented Interfaces:
java.io.Serializable
,Marker
public class BasicMarker extends java.lang.Object implements Marker
A simple implementation of theMarker
interface.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.slf4j.Marker
ANY_MARKER, ANY_NON_NULL_MARKER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Marker reference)
Add a reference to another Marker.boolean
contains(java.lang.String name)
This method is mainly used with Expression Evaluators.boolean
contains(Marker other)
Does this marker contain a reference to the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is referenced by A, or if B is referenced by any one of A's references (recursively).boolean
equals(java.lang.Object obj)
Markers are considered equal if they have the same name.java.lang.String
getName()
Get the name of this Marker.boolean
hasChildren()
int
hashCode()
Compute the hash code based on the name of this marker.boolean
hasReferences()
Does this marker have any references?java.util.Iterator<Marker>
iterator()
Returns an Iterator which can be used to iterate over the references of this marker.boolean
remove(Marker referenceToRemove)
Remove a marker reference.java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Marker
Get the name of this Marker.
-
add
public void add(Marker reference)
Description copied from interface:Marker
Add a reference to another Marker.
-
hasReferences
public boolean hasReferences()
Description copied from interface:Marker
Does this marker have any references?- Specified by:
hasReferences
in interfaceMarker
- Returns:
- true if this marker has one or more references, false otherwise.
-
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren
in interfaceMarker
-
iterator
public java.util.Iterator<Marker> iterator()
Description copied from interface:Marker
Returns an Iterator which can be used to iterate over the references of this marker. An empty iterator is returned when this marker has no references.
-
remove
public boolean remove(Marker referenceToRemove)
Description copied from interface:Marker
Remove a marker reference.
-
contains
public boolean contains(Marker other)
Description copied from interface:Marker
Does this marker contain a reference to the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is referenced by A, or if B is referenced by any one of A's references (recursively).
-
contains
public boolean contains(java.lang.String name)
This method is mainly used with Expression Evaluators.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:Marker
Markers are considered equal if they have the same name.
-
hashCode
public int hashCode()
Description copied from interface:Marker
Compute the hash code based on the name of this marker. Note that markers are considered equal if they have the same name.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-