org.parancoe.yaml
Interface YamlStream<T>

Type Parameters:
T - the type which the iterator yields
All Superinterfaces:
java.lang.Iterable<T>, java.util.Iterator<T>

public interface YamlStream<T>
extends java.lang.Iterable<T>, java.util.Iterator<T>

YamlStream is nothing but an Iterator that is also an Iterable. It allows for both of the below types of stream access:

 for (Object obj : Yaml.loadStream(yamlText)) {
     //do something with obj 
 }
 
or
 Iterator iterator = Yaml.loadStream(yamlText);
 while (iterator.hasNext()) {
     Object obj = iterator.next();
     //do something with obj
 }
 


Method Summary
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 



Copyright © 2007 JUG Padova Parancoe Team. All Rights Reserved.