info.bliki.wiki.tags.util
Class TagStack

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<TagToken>
              extended by info.bliki.wiki.tags.util.TagStack
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<TagToken>, java.util.Collection<TagToken>, java.util.List<TagToken>, java.util.RandomAccess

public class TagStack
extends java.util.ArrayList<TagToken>

Stack which contains the currently generated HTML/Wiki tags from the parsing process.

See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<BaseToken> fNodeList
          List of generated HTML/Wiki tags.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TagStack()
           
TagStack(int initialStackCapacity, int initialNodelistCapacity)
           
 
Method Summary
 void append(BaseToken contentNode)
           
 void append(TagStack stack)
           
 java.util.List<BaseToken> getNodeList()
          Return the internal list of nodes (size maybe 0)
 TagToken peek()
          Looks at the TagToken at the top of this stack without removing it from the stack.
 TagToken pop()
          Removes the TagToken at the top of this stack and returns that TagToken.
 boolean push(java.lang.String nodeString)
          Pushes a new TagNode created from the nodeString onto the top of this stack.
 boolean push(TagToken item)
          Pushes a TagToken item onto the top of this 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
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

fNodeList

protected java.util.ArrayList<BaseToken> fNodeList
List of generated HTML/Wiki tags.

Constructor Detail

TagStack

public TagStack()

TagStack

public TagStack(int initialStackCapacity,
                int initialNodelistCapacity)
Method Detail

peek

public TagToken peek()
Looks at the TagToken at the top of this stack without removing it from the stack.

Returns:
the object at the top of this stack.

pop

public TagToken pop()
Removes the TagToken at the top of this stack and returns that TagToken.

Returns:
The TagToken at the top of this stack.

push

public boolean push(TagToken item)
Pushes a TagToken item onto the top of this stack.

Parameters:
item - the TagToken item to be pushed onto this stack.
Returns:
true if this collection changed as a result of the call

push

public boolean push(java.lang.String nodeString)
Pushes a new TagNode created from the nodeString onto the top of this stack.

Parameters:
nodeString - the string for the new TagNode item to be pushed onto this stack.
Returns:
true if this collection changed as a result of the call

getNodeList

public java.util.List<BaseToken> getNodeList()
Return the internal list of nodes (size maybe 0)

Returns:

append

public void append(BaseToken contentNode)

append

public void append(TagStack stack)


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.