blob: 8f3c594ad6a72600f1926f5e14b3b9735b213709 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package org.zwobble.mammoth.internal.styles;
import org.zwobble.mammoth.internal.html.HtmlElement;
import org.zwobble.mammoth.internal.html.HtmlNode;
import org.zwobble.mammoth.internal.html.HtmlTag;
import java.util.List;
import java.util.function.Supplier;
import static org.zwobble.mammoth.internal.util.Lists.list;
public class HtmlPathElement {
private final HtmlTag tag;
public HtmlPathElement(HtmlTag tag) {
this.tag = tag;
}
public Supplier<List<HtmlNode>> wrap(Supplier<List<HtmlNode>> generateNodes) {
return () -> wrapNodes(generateNodes.get());
}
private List<HtmlNode> wrapNodes(List<HtmlNode> nodes) {
return list(new HtmlElement(tag, nodes));
}
}
|