public Iterable<Element> elements(){
  if (level != 0) {
    throw new IllegalStateException(logId() + "Unbalanced element hierarchy. Elements stack: " + dumpElements());
  }
  if (elements.isEmpty()) {
    throw new IllegalStateException(logId() + "Empty elements stack");
  }
  return Iterables.transform(this.elements,null);
}

public Iterable < Element > elements ( ) { if ( level != 0 ) { throw new IllegalStateException ( logId ( ) + "Unbalanced element hierarchy. Elements stack: " + dumpElements ( ) ) ; } if ( elements . isEmpty ( ) ) { throw new IllegalStateException ( logId ( ) + "Empty elements stack" ) ; } return Iterables . transform ( this . elements , null ) ; }
returns the top level elements added so far . this is useful if you don ' t want to build a single root container , but work with a list of elements .
