org.exolab.castor.xml.parsing
Class UnmarshalStateStack

java.lang.Object
  extended by org.exolab.castor.xml.parsing.UnmarshalStateStack

public class UnmarshalStateStack
extends Object

This class helps to access a stack in that UnmarshalStates are stored.

Author:
Philipp Erlacher

Constructor Summary
UnmarshalStateStack()
           
 
Method Summary
 UnmarshalState getFirstParentState()
           
 Integer getFirstParentStateIndex()
           
 UnmarshalState getLastState()
          Peeks the stack for the top UnmarshalState, without removing it.
 boolean hasAnotherParentState()
          Checks if there is a parent state on the stack.
 boolean isEmpty()
          Checks if the stack is empty.
 UnmarshalState peekAtState(Integer index)
           
 void pushState(UnmarshalState state)
          Pushes a UnmarshalState instance onto the stack-
 UnmarshalState removeLastState()
          Pops the top UnmarshalState off the stack.
 UnmarshalState removeParentState()
          Removes a parent state from the stack.
 void resetParentState()
           
 Integer size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmarshalStateStack

public UnmarshalStateStack()
Method Detail

getLastState

public UnmarshalState getLastState()
Peeks the stack for the top UnmarshalState, without removing it.

Returns:
Top UnmarshalState, without removing it.

removeLastState

public UnmarshalState removeLastState()
Pops the top UnmarshalState off the stack.

Returns:
Top UnmarshalState instance, removing it from the stack as well.

isEmpty

public boolean isEmpty()
Checks if the stack is empty.

Returns:
True if there is no element on the stack.

pushState

public void pushState(UnmarshalState state)
Pushes a UnmarshalState instance onto the stack-

Parameters:
state - The UnmarshalState instance to be pushed onto the stack.

hasAnotherParentState

public boolean hasAnotherParentState()
Checks if there is a parent state on the stack.

Returns:
True of there's a parent state.

removeParentState

public UnmarshalState removeParentState()
Removes a parent state from the stack.

Returns:
UnmarshalState that is a parent state

peekAtState

public UnmarshalState peekAtState(Integer index)

getFirstParentState

public UnmarshalState getFirstParentState()

getFirstParentStateIndex

public Integer getFirstParentStateIndex()

size

public Integer size()

resetParentState

public void resetParentState()


Copyright © 2013. All Rights Reserved.