2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.impl.schema;
10 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13 * Client allocated result holder for {@link ImmutableNormalizedNodeStreamWriter}.
14 * which produces instance of NormalizedNode.
16 * Client may supply result holder to {@link ImmutableNormalizedNodeStreamWriter}
17 * which will be once updated, when result is available.
19 * This is intended for using {@link ImmutableNormalizedNodeStreamWriter}
20 * without supplying builder, so instantiated writer will select
21 * correct builder based on first event and sets resulting
22 * {@link NormalizedNode} when end event is invoked for node.
25 public class NormalizedNodeResult {
27 private boolean finished = false;
28 private NormalizedNode<?,?> result;
30 public NormalizedNode<?, ?> getResult() {
34 void setResult(final NormalizedNode<?, ?> result) {
36 throw new ResultAlreadySetException("Normalized Node result was already set.", this.result);
42 public boolean isFinished() {