public class ThreadSafeWriterStack extends Object implements WriterStack
| Constructor and Description |
|---|
ThreadSafeWriterStack()
Create a
WriterStack that is thread safe. |
| Modifier and Type | Method and Description |
|---|---|
String |
peek()
Peek into the current location of the writer.
|
Object |
peek(int i)
Look at the node name on the top of the stack on the current thread.
|
NamespaceSet |
peekNamespace() |
String |
pop()
Remove a node name from the stack on the current thread.
|
void |
push(String name,
NamespaceSet namespaceSet)
Add an element name to the stack on the current thread.
|
void |
reset()
Reset the stack back to the default state.
|
int |
size() |
public ThreadSafeWriterStack()
WriterStack that is thread safe. The stack will store its
contents on the thread so this class can be shared amongst multiple
threads, but obviously there must be only one instance of the class per
writer per thread.public void push(String name, NamespaceSet namespaceSet)
push in interface WriterStackname - the node name just added.namespaceSet - the namespace set associated with the current element.public String pop()
pop in interface WriterStackpublic String peek()
peek in interface WriterStackWriterStack.peek()public NamespaceSet peekNamespace()
peekNamespace in interface WriterStackWriterStack.peekNamespace()public Object peek(int i)
public void reset()
reset in interface WriterStackWriterStack.reset()public int size()
size in interface WriterStackWriterStack.size()Copyright © 2007-2012. All Rights Reserved.