import static java.util.Objects.requireNonNull;
import java.util.Collections;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.valid.DataValidationException;
import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
+@Deprecated(since = "6.0.7", forRemoval = true)
public final class ImmutableOrderedLeafSetNodeSchemaAwareBuilder<T> extends ImmutableOrderedLeafSetNodeBuilder<T> {
-
private final LeafListSchemaNode schema;
private ImmutableOrderedLeafSetNodeSchemaAwareBuilder(final LeafListSchemaNode schema) {
super.withNodeIdentifier(new NodeIdentifier(schema.getQName()));
}
- public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema) {
+ public static <T> @NonNull ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema) {
return new ImmutableOrderedLeafSetNodeSchemaAwareBuilder<>(schema);
}
- public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema,
+ public static <T> @NonNull ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema,
final LeafSetNode<T> node) {
if (!(node instanceof ImmutableOrderedLeafSetNode<?>)) {
throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
}
@Override
- public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T value) {
+ public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue) {
// TODO check value type
- return super.withChildValue(value);
+ return super.withChildValue(childValue);
}
@Override
}
@Override
- public ListNodeBuilder<T, LeafSetEntryNode<T>> withNodeIdentifier(final NodeIdentifier nodeIdentifier) {
+ public ListNodeBuilder<T, LeafSetEntryNode<T>> withNodeIdentifier(final NodeIdentifier withNodeIdentifier) {
throw new UnsupportedOperationException("Node identifier created from schema");
}
}