Code example for LinkedList

Methods: push

0
 
  public RecursiveSequence(final Object object,
                           final FormulaContext context)
  { 
    this.context = context;
    this.stack = new LinkedList<Object>();
    this.stack.push(object);
  } 
 
  public boolean hasNext() throws EvaluationException 
  { 
    if (stack.isEmpty())
    { 
      return false; 
    } 
    final Object o = stack.pop();
    if (o instanceof Object[])
    { 
      final Object[] array = (Object[]) o;
      final RawArraySequence s = new RawArraySequence(array);
      stack.push(s);