public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create() { return new ImmutableAugmentationNodeBuilder(); }
@Override public AugmentationNode build() { return new ImmutableAugmentationNode(getNodeIdentifier(), buildValue()); }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> augmentationBuilder() { return ImmutableAugmentationNodeBuilder.create(); }
@Override public DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> withChild( final DataContainerChild<?, ?> child) { // Check nested augments DataValidationException.checkLegalData(!(child instanceof AugmentationNode), "Unable to add: %s, as a child for: %s, Nested augmentations are not permitted", child.getNodeType(), getNodeIdentifier() == null ? this : getNodeIdentifier()); return super.withChild(child); }
@Override public DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> withChild( final DataContainerChild<?, ?> child) { return super.withChild(validator.validateChild(child)); }
protected ImmutableAugmentationNodeSchemaAwareBuilder(final AugmentationSchemaNode schema) { this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(DataSchemaContextNode.augmentationIdentifierFrom(schema)); }
@Override public DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> withChild( final DataContainerChild<?, ?> child) { // Check nested augments DataValidationException.checkLegalData(!(child instanceof AugmentationNode), "Unable to add: %s, as a child for: %s, Nested augmentations are not permitted", child.getNodeType(), getNodeIdentifier() == null ? this : getNodeIdentifier()); return super.withChild(child); }
@Override public DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> withChild( final DataContainerChild<?, ?> child) { return super.withChild(validator.validateChild(child)); }
protected ImmutableAugmentationNodeSchemaAwareBuilder(final AugmentationSchemaNode schema) { this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(DataSchemaContextNode.augmentationIdentifierFrom(schema)); }
@Override public AugmentationNode build() { return new ImmutableAugmentationNode(getNodeIdentifier(), buildValue()); }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> augmentationBuilder() { return ImmutableAugmentationNodeBuilder.create(); }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create() { return new ImmutableAugmentationNodeBuilder(); }
@Override @SuppressWarnings("rawtypes") protected DataContainerNodeBuilder createBuilder(final NormalizedNode<?, ?> original) { checkArgument(original instanceof AugmentationNode); return ImmutableAugmentationNodeBuilder.create((AugmentationNode) original); }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create(final int sizeHint) { return new ImmutableAugmentationNodeBuilder(sizeHint); }
@Override @SuppressWarnings("rawtypes") protected DataContainerNodeBuilder createBuilder(final NormalizedNode<?, ?> original) { checkArgument(original instanceof AugmentationNode); return ImmutableAugmentationNodeBuilder.create((AugmentationNode) original); }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create(final int sizeHint) { return new ImmutableAugmentationNodeBuilder(sizeHint); }
@Override protected NormalizedNode<?, ?> createEmptyValue(final NormalizedNode<?, ?> original) { checkArgument(original instanceof AugmentationNode); return ImmutableAugmentationNodeBuilder.create() .withNodeIdentifier(((AugmentationNode) original).getIdentifier()).build(); } }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create( final AugmentationNode node) { if (!(node instanceof ImmutableAugmentationNode)) { throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass())); } return new ImmutableAugmentationNodeBuilder((ImmutableAugmentationNode)node); }
@Override protected NormalizedNode<?, ?> createEmptyValue(final NormalizedNode<?, ?> original) { checkArgument(original instanceof AugmentationNode); return ImmutableAugmentationNodeBuilder.create() .withNodeIdentifier(((AugmentationNode) original).getIdentifier()).build(); } }
public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> create( final AugmentationNode node) { if (!(node instanceof ImmutableAugmentationNode)) { throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass())); } return new ImmutableAugmentationNodeBuilder((ImmutableAugmentationNode)node); }