@Override public Object serialize(final Object arg0) { // Empty type has null value in NormalizedNode and Composite Node // representation return Empty.getInstance(); }
@Override public Empty parseValue(final NamespaceContext ctx, final String str) { return Empty.getInstance(); }
@Override public Object serialize(final Object input) { // Empty type has Empty value in NormalizedNode and Composite Node representation return Empty.getInstance(); }
@Override public Empty parseValue(final Object ctx, final String input) { return Empty.getInstance(); }
@Override public Empty parseValue(final Object ctx, final String input) { return Empty.getInstance(); }
@Override public Empty deserialize(final String stringRepresentation) { checkArgument(stringRepresentation.isEmpty(), "The value must be empty"); return Empty.getInstance(); } }
@Override public Empty deserialize(final String stringRepresentation) { checkArgument(stringRepresentation.isEmpty(), "The value must be empty"); return Empty.getInstance(); } }
public static TypedefEmpty getDefaultInstance() { return new TypedefEmpty(Empty.getInstance()); }
return Empty.getInstance();
private static NormalizedNode<?, ?> createTestContainer() { byte[] bytes1 = {1, 2, 3}; LeafSetEntryNode<Object> entry1 = ImmutableLeafSetEntryNodeBuilder.create().withNodeIdentifier( new NodeWithValue<>(TestModel.BINARY_LEAF_LIST_QNAME, bytes1)).withValue(bytes1).build(); byte[] bytes2 = {}; LeafSetEntryNode<Object> entry2 = ImmutableLeafSetEntryNodeBuilder.create().withNodeIdentifier( new NodeWithValue<>(TestModel.BINARY_LEAF_LIST_QNAME, bytes2)).withValue(bytes2).build(); return TestModel.createBaseTestContainerBuilder() .withChild(ImmutableLeafSetNodeBuilder.create().withNodeIdentifier( new NodeIdentifier(TestModel.BINARY_LEAF_LIST_QNAME)) .withChild(entry1).withChild(entry2).build()) .withChild(ImmutableNodes.leafNode(TestModel.SOME_BINARY_DATA_QNAME, new byte[]{1, 2, 3, 4})) .withChild(ImmutableNodes.leafNode(TestModel.EMPTY_QNAME, Empty.getInstance())) .withChild(Builders.orderedMapBuilder() .withNodeIdentifier(new NodeIdentifier(TestModel.ORDERED_LIST_QNAME)) .withChild(ImmutableNodes.mapEntry(TestModel.ORDERED_LIST_ENTRY_QNAME, TestModel.ID_QNAME, 11)).build()).build(); }