List of usage examples for java.util AbstractCollection iterator
public abstract Iterator<E> iterator();
From source file:com.aregner.pandora.XmlRpc.java
public static String value(AbstractCollection<?> list) { StringBuilder result = new StringBuilder("<value><array><data>"); Iterator<?> listIter = list.iterator(); while (listIter.hasNext()) { result.append(valueGuess(listIter.next())); }//www . j av a2 s . c o m return result.append("</data></array></value>").toString(); }
From source file:bz.tsung.jsonapi4j.serialization.SingletonSerializer.java
@Override public void serialize(AbstractCollection data, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { jsonGenerator.writeObject(data.iterator().next()); }