org.apache.logging.log4j
Class ThreadContext.ImmutableStack
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<String>
org.apache.logging.log4j.ThreadContext.ImmutableStack
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<String>, Collection<String>, List<String>, RandomAccess, ThreadContext.ContextStack
- Enclosing class:
- ThreadContext
public static class ThreadContext.ImmutableStack
- extends ArrayList<String>
An immutable ContextStack.
- See Also:
- Serialized Form
Method Summary |
void |
push(String message)
Add an element to the stack. |
void |
trim(int depth)
Trims elements from the end of the stack. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
ThreadContext.ImmutableStack
public ThreadContext.ImmutableStack()
ThreadContext.ImmutableStack
public ThreadContext.ImmutableStack(Collection<String> collection)
ThreadContext.ImmutableStack
public ThreadContext.ImmutableStack(org.apache.logging.log4j.ThreadContext.ThreadContextStack stack)
push
public void push(String message)
- Description copied from interface:
ThreadContext.ContextStack
- Add an element to the stack.
- Specified by:
push
in interface ThreadContext.ContextStack
- Parameters:
message
- The element to add.
trim
public void trim(int depth)
- Description copied from interface:
ThreadContext.ContextStack
- Trims elements from the end of the stack.
- Specified by:
trim
in interface ThreadContext.ContextStack
- Parameters:
depth
- The maximum number of items in the stack to keep.
Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.