import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.parser.builder.util.Comparators;
import org.opendaylight.yangtools.yang.parser.util.YangParseException;
-public final class ChoiceBuilder extends AbstractSchemaNodeBuilder implements DataSchemaNodeBuilder,
-AugmentationTargetBuilder {
- private ChoiceNodeImpl instance;
+/**
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
+ */
+@Deprecated
+public final class ChoiceBuilder extends AbstractSchemaNodeBuilder implements DataSchemaNodeBuilder, AugmentationTargetBuilder {
+ private ChoiceSchemaNodeImpl instance;
// DataSchemaNode args
private boolean augmenting;
return instance;
}
- instance = new ChoiceNodeImpl(qname, schemaPath);
+ instance = new ChoiceSchemaNodeImpl(qname, schemaPath);
instance.description = description;
instance.reference = reference;
instance.addedByUses = addedByUses;
instance.configuration = configuration;
- instance.constraints = constraints.toInstance();
+ instance.constraints = constraints.build();
instance.defaultCase = defaultCase;
// ORIGINAL NODE
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((schemaPath == null) ? 0 : schemaPath.hashCode());
+ result = prime * result + Objects.hashCode(schemaPath);
return result;
}