blob: 0d8388299de5d2f78f5528277a3cee51f22378da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package org.zwobble.mammoth.tests.documents;
import com.google.common.collect.ImmutableList;
import com.natpryce.makeiteasy.Instantiator;
import com.natpryce.makeiteasy.Property;
import org.zwobble.mammoth.documents.DocumentElement;
import org.zwobble.mammoth.documents.HasChildren;
import org.zwobble.mammoth.documents.Paragraph;
import java.util.List;
import java.util.Optional;
import static com.natpryce.makeiteasy.Property.newProperty;
public class DocumentElementMakers {
public static final Property<HasChildren, List<DocumentElement>> CHILDREN = newProperty();
public static final Instantiator<Paragraph> PARAGRAPH =
propertyLookup -> new Paragraph(
Optional.empty(),
propertyLookup.valueOf(CHILDREN, ImmutableList.of()));
}
|