Code example for Stack

Methods: firstElement

0
 
  } 
 
 
  public void setThenSaxEventList(List<SaxEvent> thenSaxEventList) {
    IfState state = stack.firstElement();
    if(state.active) {
      state.thenSaxEventList = thenSaxEventList;
    } else { 
      throw new IllegalStateException("setThenSaxEventList() invoked on inactive IfAction");
    } 
  } 
 
  public void setElseSaxEventList(List<SaxEvent> elseSaxEventList) {
    IfState state = stack.firstElement();
    if(state.active) {
      state.elseSaxEventList = elseSaxEventList;
    } else { 
      throw new IllegalStateException("setElseSaxEventList() invoked on inactive IfAction");
    }