• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ListNodeBuilder类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder的典型用法代码示例。如果您正苦于以下问题:Java ListNodeBuilder类的具体用法?Java ListNodeBuilder怎么用?Java ListNodeBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ListNodeBuilder类属于org.opendaylight.yangtools.yang.data.impl.schema.builder.api包,在下文中一共展示了ListNodeBuilder类的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addLeafSetChildren

点赞 3

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private ListNodeBuilder<Object, LeafSetEntryNode<Object>> addLeafSetChildren(final QName nodeType,
        final ListNodeBuilder<Object, LeafSetEntryNode<Object>> builder) throws IOException {

    LOG.trace("Reading children of leaf set");

    lastLeafSetQName = nodeType;

    LeafSetEntryNode<Object> child = (LeafSetEntryNode<Object>)readNormalizedNodeInternal();

    while (child != null) {
        builder.withChild(child);
        child = (LeafSetEntryNode<Object>)readNormalizedNodeInternal();
    }
    return builder;
}
 

开发者ID:hashsdn,
项目名称:hashsdn-controller,
代码行数:17,
代码来源:NormalizedNodeInputStreamReader.java

示例2: reflectedAttributes

点赞 3

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
/**
 * Attributes when reflecting a route from Internal iBGP (Application Peer)
 * @param attributes
 * @return
 */
ContainerNode reflectedAttributes(final ContainerNode attributes) {
    final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> attributesContainer = Builders.containerBuilder(attributes);

    // if there was a CLUSTER_LIST attribute, add it
    final Optional<NormalizedNode<?, ?>> maybeClusterList = NormalizedNodes.findNode(attributes, this.clusterListPath);
    if (maybeClusterList.isPresent()) {
        // Create a new CLUSTER_LIST builder
        final ListNodeBuilder<Object, LeafSetEntryNode<Object>> clusterBuilder = Builders.orderedLeafSetBuilder();
        clusterBuilder.withNodeIdentifier(this.clusterListLeaf);
        AttributeOperations.addOtherClusterEntries(maybeClusterList, clusterBuilder);
        // Now wrap it in a container and add it to attributes
        final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> clusterListCont= Builders.containerBuilder();
        clusterListCont.withNodeIdentifier(this.clusterListContainer);
        clusterListCont.withChild(clusterBuilder.build());
        attributesContainer.withChild(clusterListCont.build());
    }

    return attributesContainer.build();
}
 

开发者ID:opendaylight,
项目名称:bgpcep,
代码行数:25,
代码来源:AttributeOperations.java

示例3: createList3Entry

点赞 3

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private static MapEntryNode createList3Entry(final String keyVal,
        final String l3Val1, final String l3Val2, final String l3Val3) {
    final DataContainerNodeAttrBuilder<NodeIdentifierWithPredicates, MapEntryNode> mapEntryBuilder = Builders
            .mapEntryBuilder();
    mapEntryBuilder.withNodeIdentifier(new NodeIdentifierWithPredicates(
            list3InChoice, k, keyVal));

    final ListNodeBuilder<Object, LeafSetEntryNode<Object>> leafSetBuilder = Builders
            .leafSetBuilder();
    leafSetBuilder.withNodeIdentifier(new NodeIdentifier(l3));

    leafSetBuilder.addChild(createLeafSetEntry(l3, l3Val1));
    leafSetBuilder.addChild(createLeafSetEntry(l3, l3Val2));
    leafSetBuilder.addChild(createLeafSetEntry(l3, l3Val3));

    mapEntryBuilder.addChild(ImmutableNodes.leafNode(k, keyVal));
    mapEntryBuilder.addChild(leafSetBuilder.build());

    return mapEntryBuilder.build();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:21,
代码来源:DataTreeCandidateValidatorTest.java

示例4: doWrite

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private DOMStoreThreePhaseCommitCohort doWrite(final YangInstanceIdentifier path,
                                               final Collection<MemberName> replicas) {

    final ListNodeBuilder<Object, LeafSetEntryNode<Object>> replicaListBuilder =
            ImmutableLeafSetNodeBuilder.create().withNodeIdentifier(
                    new NodeIdentifier(ClusterUtils.SHARD_REPLICA_QNAME));

    replicas.forEach(name -> replicaListBuilder.withChild(
            ImmutableLeafSetEntryNodeBuilder.create()
                    .withNodeIdentifier(new NodeWithValue<>(ClusterUtils.SHARD_REPLICA_QNAME, name.getName()))
                    .withValue(name.getName())
                    .build()));

    final MapEntryNode newEntry = ImmutableMapEntryNodeBuilder.create()
            .withNodeIdentifier(
                    new NodeIdentifierWithPredicates(ClusterUtils.SHARD_LIST_QNAME, ClusterUtils.SHARD_PREFIX_QNAME,
                            path))
            .withChild(ImmutableLeafNodeBuilder.create()
                    .withNodeIdentifier(new NodeIdentifier(ClusterUtils.SHARD_PREFIX_QNAME))
                    .withValue(path)
                    .build())
            .withChild(ImmutableContainerNodeBuilder.create()
                    .withNodeIdentifier(new NodeIdentifier(ClusterUtils.SHARD_REPLICAS_QNAME))
                    .withChild(replicaListBuilder.build())
                    .build())
            .build();

    final ClientTransaction tx = history.createTransaction();
    final DOMDataTreeWriteCursor cursor = tx.openCursor();

    ClusterUtils.SHARD_LIST_PATH.getPathArguments().forEach(cursor::enter);

    cursor.write(newEntry.getIdentifier(), newEntry);
    cursor.close();

    return tx.ready();
}
 

开发者ID:hashsdn,
项目名称:hashsdn-controller,
代码行数:38,
代码来源:PrefixedShardConfigWriter.java

示例5: addOtherClusterEntries

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private static void addOtherClusterEntries(final Optional<NormalizedNode<?, ?>> maybeClusterList, final ListNodeBuilder<Object,
    LeafSetEntryNode<Object>> clb) {
    final NormalizedNode<?, ?> clusterList = maybeClusterList.get();
    if (clusterList instanceof LeafSetNode) {
        for (final LeafSetEntryNode<?> n : ((LeafSetNode<?>) clusterList).getValue()) {
            // There's no way we can safely avoid this cast
            @SuppressWarnings("unchecked")
            final LeafSetEntryNode<Object> child = (LeafSetEntryNode<Object>) n;
            clb.addChild(child);
        }
    } else {
        LOG.warn("Ignoring malformed CLUSTER_LIST {}", clusterList);
    }
}
 

开发者ID:opendaylight,
项目名称:bgpcep,
代码行数:15,
代码来源:AttributeOperations.java

示例6: childLflst11

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private static DataContainerChild<? extends PathArgument, ?> childLflst11() {
    ListNodeBuilder<Object, LeafSetEntryNode<Object>> lflst11 = Builders.leafSetBuilder().withNodeIdentifier(
            new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "lflst11")));
    lflst11.withChild(Builders
            .leafSetEntryBuilder()
            .withNodeIdentifier(new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"),
                    "lflst11 value1"))
            .withValue("lflst11 value1").build());
    lflst11.withChild(Builders
            .leafSetEntryBuilder()
            .withNodeIdentifier(new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"),
                    "lflst11 value2"))
            .withValue("lflst11 value2").build());
    return lflst11.build();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:16,
代码来源:TestingNormalizedNodeStructuresCreator.java

示例7: childLflst11Multiline

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private static DataContainerChild<? extends PathArgument, ?> childLflst11Multiline() {
    ListNodeBuilder<Object, LeafSetEntryNode<Object>> lflst11 = Builders.leafSetBuilder().withNodeIdentifier(
            new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "lflst11")));
    lflst11.withChild(Builders
            .leafSetEntryBuilder()
            .withNodeIdentifier(new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"),
                    "lflst11 value1\nanother line 1"))
            .withValue("lflst11 value1\nanother line 1").build());
    lflst11.withChild(Builders
            .leafSetEntryBuilder()
            .withNodeIdentifier(new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"),
                    "lflst11 value2\r\nanother line 2"))
            .withValue("lflst11 value2\r\nanother line 2").build());
    return lflst11.build();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:16,
代码来源:TestingNormalizedNodeStructuresCreator.java

示例8: startLeafSet

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public void startLeafSet(final NodeIdentifier name, final int childSizeHint) {
    checkDataNodeContainer();
    final ListNodeBuilder<Object, LeafSetEntryNode<Object>> builder = UNKNOWN_SIZE == childSizeHint
            ? InterningLeafSetNodeBuilder.create(nextSchema)
                    : InterningLeafSetNodeBuilder.create(nextSchema, childSizeHint);
    builder.withNodeIdentifier(name);
    enter(builder);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:10,
代码来源:ImmutableNormalizedNodeStreamWriter.java

示例9: startOrderedLeafSet

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public void startOrderedLeafSet(final NodeIdentifier name, final int childSizeHint) {
    checkDataNodeContainer();
    final ListNodeBuilder<Object, LeafSetEntryNode<Object>> builder = Builders.orderedLeafSetBuilder();
    builder.withNodeIdentifier(name);
    enter(builder);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:8,
代码来源:ImmutableNormalizedNodeStreamWriter.java

示例10: create

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final DataSchemaNode schema) {
    final LeafsetEntryInterner interner = getInterner(schema);
    if (interner != null) {
        return new InterningLeafSetNodeBuilder<>(interner);
    }

    return ImmutableLeafSetNodeBuilder.create();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:9,
代码来源:InterningLeafSetNodeBuilder.java

示例11: create

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafSetNode<T> node) {
    if (!(node instanceof ImmutableOrderedLeafSetNode<?>)) {
        throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
    }

    return new ImmutableOrderedLeafSetNodeBuilder<>((ImmutableOrderedLeafSetNode<T>) node);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:8,
代码来源:ImmutableOrderedLeafSetNodeBuilder.java

示例12: withChildValue

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue,
        final Map<QName, String> attributes) {
    final ImmutableLeafSetEntryNodeBuilder<T> b = ImmutableLeafSetEntryNodeBuilder.create();
    b.withNodeIdentifier(new NodeWithValue<>(nodeIdentifier.getNodeType(), childValue));
    b.withValue(childValue);
    b.withAttributes(attributes);
    return withChild(b.build());
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:10,
代码来源:ImmutableOrderedLeafSetNodeBuilder.java

示例13: create

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> 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()));
    }

    return new ImmutableOrderedLeafSetNodeSchemaAwareBuilder<>(schema, (ImmutableOrderedLeafSetNode<T>) node);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:9,
代码来源:ImmutableOrderedLeafSetNodeSchemaAwareBuilder.java

示例14: withChild

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) {
    checkArgument(schema.getQName().equals(child.getNodeType()), "Incompatible node type, should be: %s, is: %s",
        schema.getQName(), child.getNodeType());
    // TODO check value type using TypeProvider ?
    DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(),
        schema, Collections.singleton(schema.getQName()));
    return super.withChild(child);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:10,
代码来源:ImmutableOrderedLeafSetNodeSchemaAwareBuilder.java

示例15: create

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema,
        final LeafSetNode<T> node) {
    if (!(node instanceof ImmutableLeafSetNode<?>)) {
        throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
    }

    return new ImmutableLeafSetNodeSchemaAwareBuilder<>(schema, (ImmutableLeafSetNode<T>) node);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:9,
代码来源:ImmutableLeafSetNodeSchemaAwareBuilder.java

示例16: withChild

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) {
    checkArgument(schema.getQName().equals(child.getNodeType()),
            "Incompatible node type, should be: %s, is: %s", schema.getQName(), child.getNodeType());
    // TODO check value type using TypeProvider ?
    DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(),
        schema, Collections.singleton(schema.getQName()));
    return super.withChild(child);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:10,
代码来源:ImmutableLeafSetNodeSchemaAwareBuilder.java

示例17: create

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafSetNode<T> node) {
    if (!(node instanceof ImmutableLeafSetNode<?>)) {
        throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
    }

    return new ImmutableLeafSetNodeBuilder<>((ImmutableLeafSetNode<T>) node);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:8,
代码来源:ImmutableLeafSetNodeBuilder.java

示例18: createLeafRefLeafListNode

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private static LeafSetNode<?> createLeafRefLeafListNode() {

        final ListNodeBuilder<Object, LeafSetEntryNode<Object>> leafSetBuilder = Builders
                .leafSetBuilder();
        leafSetBuilder.withNodeIdentifier(new NodeIdentifier(leafrefLeafList));

        leafSetBuilder.addChild(createLeafSetEntry(leafrefLeafList, "k1"));
        leafSetBuilder.addChild(createLeafSetEntry(leafrefLeafList, "k2"));
        leafSetBuilder.addChild(createLeafSetEntry(leafrefLeafList, "k3"));

        return leafSetBuilder.build();
    }
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:13,
代码来源:DataTreeCandidateValidatorTest.java

示例19: readNodeIdentifierDependentNode

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
private NormalizedNode<?, ?> readNodeIdentifierDependentNode(final byte nodeType, final NodeIdentifier identifier)
    throws IOException {

    switch (nodeType) {
        case NodeTypes.LEAF_NODE :
            LOG.trace("Read leaf node {}", identifier);
            // Read the object value
            return leafBuilder().withNodeIdentifier(identifier).withValue(readObject()).build();

        case NodeTypes.ANY_XML_NODE :
            LOG.trace("Read xml node");
            return Builders.anyXmlBuilder().withNodeIdentifier(identifier).withValue(readDOMSource()).build();

        case NodeTypes.MAP_NODE :
            LOG.trace("Read map node {}", identifier);
            return addDataContainerChildren(Builders.mapBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.CHOICE_NODE:
            LOG.trace("Read choice node {}", identifier);
            return addDataContainerChildren(Builders.choiceBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.ORDERED_MAP_NODE:
            LOG.trace("Reading ordered map node {}", identifier);
            return addDataContainerChildren(Builders.orderedMapBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.UNKEYED_LIST:
            LOG.trace("Read unkeyed list node {}", identifier);
            return addDataContainerChildren(Builders.unkeyedListBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.UNKEYED_LIST_ITEM:
            LOG.trace("Read unkeyed list item node {}", identifier);
            return addDataContainerChildren(Builders.unkeyedListEntryBuilder()
                    .withNodeIdentifier(identifier)).build();

        case NodeTypes.CONTAINER_NODE:
            LOG.trace("Read container node {}", identifier);
            return addDataContainerChildren(Builders.containerBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.LEAF_SET :
            LOG.trace("Read leaf set node {}", identifier);
            return addLeafSetChildren(identifier.getNodeType(),
                    Builders.leafSetBuilder().withNodeIdentifier(identifier)).build();

        case NodeTypes.ORDERED_LEAF_SET:
            LOG.trace("Read ordered leaf set node {}", identifier);
            ListNodeBuilder<Object, LeafSetEntryNode<Object>> orderedLeafSetBuilder =
                    Builders.orderedLeafSetBuilder().withNodeIdentifier(identifier);
            orderedLeafSetBuilder = addLeafSetChildren(identifier.getNodeType(), orderedLeafSetBuilder);
            return orderedLeafSetBuilder.build();

        default :
            return null;
    }
}
 

开发者ID:hashsdn,
项目名称:hashsdn-controller,
代码行数:55,
代码来源:NormalizedNodeInputStreamReader.java

示例20: exportedAttributes

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
ContainerNode exportedAttributes(final ContainerNode attributes, final Long localAs) {
    final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> containerBuilder = Builders.containerBuilder();
    containerBuilder.withNodeIdentifier(attributes.getIdentifier());

    // First filter out non-transitive attributes
    // FIXME: removes MULTI_EXIT_DISC, too.
    spliceTransitives(containerBuilder, attributes);

    final CollectionNodeBuilder<UnkeyedListEntryNode, UnkeyedListNode> segmentsBuilder = Builders.unkeyedListBuilder();
    segmentsBuilder.withNodeIdentifier(this.asPathSegments);

    final Optional<NormalizedNode<?, ?>> maybeOldAsSegments = NormalizedNodes.findNode(attributes, this.asPathContainer, this.asPathSegments);
    if (maybeOldAsSegments.isPresent() && !((UnkeyedListNode) maybeOldAsSegments.get()).getValue().isEmpty()) {

        /*
         * We need to check the first segment.
         * If it has as-set then new as-sequence with local AS is prepended.
         * If it has as-sequence, we may add local AS when it has less than 255 elements.
         * Otherwise we need to create new as-sequence for local AS.
         */

        final ListNodeBuilder<Object,LeafSetEntryNode<Object>> asSequenceBuilder = Builders.orderedLeafSetBuilder();
        // add local AS
        asSequenceBuilder.withNodeIdentifier(this.asPathSequence).addChild(Builders.leafSetEntryBuilder().withNodeIdentifier(
            new NodeWithValue<>(this.asNumberQname, localAs)).withValue(localAs).build());

        final Iterator<UnkeyedListEntryNode> oldAsSegments = ((UnkeyedListNode) maybeOldAsSegments.get()).getValue().iterator();
        final UnkeyedListEntryNode firstSegment = oldAsSegments.next();
        final LeafSetNode<?> reusableAsSeq = reusableSegment(firstSegment);
        // first segment contains as-sequence with less then 255 elements and it's append to local AS
        if (reusableAsSeq != null) {
            for (final LeafSetEntryNode<?> child : reusableAsSeq.getValue())  {
                asSequenceBuilder.withChild(Builders.leafSetEntryBuilder().withNodeIdentifier(new NodeWithValue<>(
                        this.asNumberQname, child.getValue())).withValue(child.getValue()).build());
            }
        }
        // Add the new first segment
        segmentsBuilder.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(this.asPathSegments).withChild(asSequenceBuilder.build()).build());

        // When first segment contains as-set or full as-sequence, append it
        if (reusableAsSeq == null) {
            segmentsBuilder.withChild(firstSegment);
        }

        // Add all subsequent segments
        while (oldAsSegments.hasNext()) {
            segmentsBuilder.withChild(oldAsSegments.next());
        }
    } else {
        // Segments are completely empty, create a completely new AS_PATH container with
        // a single entry
        segmentsBuilder.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(this.asPathSegments).withChild(
            Builders.orderedLeafSetBuilder().withNodeIdentifier(this.asPathSequence).addChild(
                Builders.leafSetEntryBuilder().withNodeIdentifier(new NodeWithValue<>(this.asNumberQname, localAs))
                .withValue(localAs).build()).build()).build());
    }

    containerBuilder.withChild(Builders.containerBuilder().withNodeIdentifier(this.asPathContainer).withChild(segmentsBuilder.build()).build());
    return containerBuilder.build();
}
 

开发者ID:opendaylight,
项目名称:bgpcep,
代码行数:61,
代码来源:AttributeOperations.java

示例21: orderedLeafSetBuilder

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> orderedLeafSetBuilder() {
    return ImmutableOrderedLeafSetNodeBuilder.create();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:4,
代码来源:Builders.java

示例22: leafSetBuilder

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder() {
    return ImmutableLeafSetNodeBuilder.create();
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:4,
代码来源:Builders.java

示例23: createBuilder

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
protected ListNodeBuilder<?, ?> createBuilder(final PathArgument compositeNode) {
    return Builders.orderedLeafSetBuilder().withNodeIdentifier(getIdentifier());
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:5,
代码来源:InstanceIdToCompositeNodes.java

示例24: withChild

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) {
    return super.withChild(interner.intern(child));
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:5,
代码来源:InterningLeafSetNodeBuilder.java

示例25: withChild

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) {
    checkDirty();
    this.value.put(child.getIdentifier(), child);
    return this;
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:7,
代码来源:ImmutableOrderedLeafSetNodeBuilder.java

示例26: withoutChild

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withoutChild(final PathArgument key) {
    checkDirty();
    this.value.remove(key);
    return this;
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:7,
代码来源:ImmutableOrderedLeafSetNodeBuilder.java

示例27: withChildValue

点赞 2

import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; //导入依赖的package包/类
@Override
public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue) {
    // TODO check value type
    return super.withChildValue(childValue);
}
 

开发者ID:opendaylight,
项目名称:yangtools,
代码行数:6,
代码来源:ImmutableOrderedLeafSetNodeSchemaAwareBuilder.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)