net.sf.quarrel.file
Class ElementCollector

java.lang.Object
  extended bynet.sf.quarrel.file.ElementCollector

public final class ElementCollector
extends java.lang.Object

Responsible for building an intermediate model from the contents of an InputStream. The StreamParser class will read the stream and feed the contents to ElementCollector.


Constructor Summary
ElementCollector()
           
 
Method Summary
 void add(java.lang.String line)
          Adds a line to the current compartment
 java.util.Iterator elements()
          Returns an iterator over the set of elements that have been collector.
 void finish()
          Brings the state of the collector to a completed state.
 void pop()
          Pop the current compartment off the stack.
 void push(java.lang.String name)
          Pushes a new compartment into the collector using the specified name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementCollector

public ElementCollector()
Method Detail

elements

public java.util.Iterator elements()
Returns an iterator over the set of elements that have been collector.

Returns:
an Iterator for the collector elements

push

public void push(java.lang.String name)
Pushes a new compartment into the collector using the specified name

Parameters:
name - the name of the compartment to be added

finish

public void finish()
Brings the state of the collector to a completed state.


add

public void add(java.lang.String line)
Adds a line to the current compartment

Parameters:
line - the String to add to the current compartment

pop

public void pop()
Pop the current compartment off the stack.



Copyright © 2006-2007. All Rights Reserved.