001 package org.shiftone.jrat.util;
002
003
004 import java.util.Collection;
005 import java.util.Iterator;
006
007
008 /**
009 * @author jeff@shiftone.org (Jeff Drost)
010 */
011 public class HtmlUtil {
012
013 public static String toHtml(Collection collection) {
014
015 StringBuffer sb = new StringBuffer();
016
017 sb.append("<ul>");
018
019 Iterator iterator = collection.iterator();
020
021 while (iterator.hasNext()) {
022 sb.append("<li>");
023 sb.append(iterator.next());
024 sb.append("</li>");
025 }
026
027 sb.append("</ul>");
028
029 return sb.toString();
030 }
031 }