Some checks failed
Fast Reverse Tests / test (push) Failing after 17s
Markup Tests / test (push) Failing after 13s
Reverse Tests / test (push) Failing after 13s
Sum Tests / test (push) Failing after 13s
Word Stat Tests / test (push) Failing after 13s
Word Stat++ Tests / test (push) Failing after 13s
29 lines
633 B
Java
29 lines
633 B
Java
package markup;
|
|
|
|
import java.util.List;
|
|
|
|
public class UnorderedList implements ListItemContent {
|
|
private final List<ListItem> items;
|
|
|
|
public UnorderedList(List<ListItem> items) {
|
|
this.items = items;
|
|
}
|
|
|
|
@Override
|
|
public void toHtml(StringBuilder sb) {
|
|
sb.append("<ul>");
|
|
for (ListItem item : items) {
|
|
item.toHtml(sb);
|
|
}
|
|
sb.append("</ul>");
|
|
}
|
|
|
|
@Override
|
|
public void toTex(StringBuilder sb) {
|
|
sb.append("\\begin{itemize}");
|
|
for (ListItem item : items) {
|
|
item.toTex(sb);
|
|
}
|
|
sb.append("\\end{itemize}");
|
|
}
|
|
} |