本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.equals()
方法的一些代码示例,展示了YangInstanceIdentifier.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInstanceIdentifier.equals()
方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
类名称:YangInstanceIdentifier
方法名:equals
暂无
代码示例来源:origin: opendaylight/controller
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DOMDataTreeIdentifier)) {
return false;
}
DOMDataTreeIdentifier other = (DOMDataTreeIdentifier) obj;
if (datastoreType != other.datastoreType) {
return false;
}
return rootIdentifier.equals(other.rootIdentifier);
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-dom-api
@Override
public boolean equals(final @Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DOMDataTreeIdentifier)) {
return false;
}
DOMDataTreeIdentifier other = (DOMDataTreeIdentifier) obj;
return datastoreType == other.datastoreType && rootIdentifier.equals(other.rootIdentifier);
}
代码示例来源:origin: io.fd.honeycomb/data-impl
@Override
public boolean equals(final Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
final NormalizedNodeUpdate that = (NormalizedNodeUpdate) other;
return id.equals(that.id);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-data-api
@Override
boolean pathArgumentsEqual(final YangInstanceIdentifier other) {
if (other instanceof StackedYangInstanceIdentifier) {
final StackedYangInstanceIdentifier stacked = (StackedYangInstanceIdentifier) other;
return pathArgument.equals(stacked.pathArgument) && parent.equals(stacked.parent);
}
return super.pathArgumentsEqual(other);
}
代码示例来源:origin: opendaylight/yangtools
@Override
boolean pathArgumentsEqual(final YangInstanceIdentifier other) {
if (other instanceof StackedYangInstanceIdentifier) {
final StackedYangInstanceIdentifier stacked = (StackedYangInstanceIdentifier) other;
return pathArgument.equals(stacked.pathArgument) && parent.equals(stacked.parent);
}
return super.pathArgumentsEqual(other);
}
代码示例来源:origin: opendaylight/controller
@Override
public boolean equals(final Object obj) {
return this == obj || obj instanceof DOMMountPoint && identifier.equals(((DOMMountPoint) obj).getIdentifier());
}
}
代码示例来源:origin: org.opendaylight.controller/sal-common-api
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Entity entity = (Entity) o;
if (!id.equals(entity.id)) {
return false;
}
if (!type.equals(entity.type)) {
return false;
}
return true;
}
代码示例来源:origin: org.opendaylight.netconf/mdsal-netconf-connector
private SchemaPath getSchemaPath(final YangInstanceIdentifier dataRoot) {
return SchemaPath.create(Iterables.transform(dataRoot.getPathArguments(), PATH_ARG_TO_QNAME), dataRoot.equals(ROOT));
}
代码示例来源:origin: opendaylight/controller
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DOMMountPoint)) {
return false;
}
DOMMountPoint other = (DOMMountPoint) obj;
return getIdentifier().equals(other.getIdentifier());
}
代码示例来源:origin: org.opendaylight.controller/mdsal-netconf-connector
private SchemaPath getSchemaPath(final YangInstanceIdentifier dataRoot) {
return SchemaPath.create(Iterables.transform(dataRoot.getPathArguments(), PATH_ARG_TO_QNAME), dataRoot.equals(ROOT));
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-dom-inmemory-datastore
void delete(final YangInstanceIdentifier path) {
final YangInstanceIdentifier relativePath = toRelative(path);
Preconditions.checkArgument(!YangInstanceIdentifier.EMPTY.equals(relativePath),
"Deletion of shard root is not allowed");
SimpleCursorOperation.DELETE.apply(getCursor(), relativePath, null);
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(final YangInstanceIdentifier path) {
Preconditions.checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed");
LOG.debug("Tx {} read {}", getIdentifier(), path);
if (YangInstanceIdentifier.EMPTY.equals(path)) {
return readAllData();
} else {
return singleShardRead(shardNameFromIdentifier(path), path);
}
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public void write(YangInstanceIdentifier yangInstanceIdentifier, NormalizedNode<?, ?> normalizedNode) {
try {
if(YangInstanceIdentifier.EMPTY.equals(yangInstanceIdentifier)){
pruneAndWriteNode(yangInstanceIdentifier, normalizedNode);
} else {
delegate.write(yangInstanceIdentifier, normalizedNode);
}
} catch (SchemaValidationFailedException e){
LOG.warn("Node at path : {} was pruned during write due to validation error: {}",
yangInstanceIdentifier, e.getMessage());
pruneAndWriteNode(yangInstanceIdentifier, normalizedNode);
}
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public void merge(YangInstanceIdentifier yangInstanceIdentifier, NormalizedNode<?, ?> normalizedNode) {
try {
if(YangInstanceIdentifier.EMPTY.equals(yangInstanceIdentifier)){
pruneAndMergeNode(yangInstanceIdentifier, normalizedNode);
} else {
delegate.merge(yangInstanceIdentifier, normalizedNode);
}
} catch (SchemaValidationFailedException e){
LOG.warn("Node at path {} was pruned during merge due to validation error: {}",
yangInstanceIdentifier, e.getMessage());
pruneAndMergeNode(yangInstanceIdentifier, normalizedNode);
}
}
代码示例来源:origin: org.opendaylight.controller/sal-remoterpc-connector
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final RouteIdentifierImpl that = (RouteIdentifierImpl) o;
if (context == null){
if (that.getContext() != null) return false;
}else
if (!context.equals(that.context)) return false;
if (route == null){
if (that.getRoute() != null) return false;
}else
if (!route.equals(that.route)) return false;
if (type == null){
if (that.getType() != null) return false;
}else
if (!type.equals(that.type)) return false;
return true;
}
代码示例来源:origin: org.opendaylight.netconf/mdsal-netconf-connector
protected Element serializeNodeWithParentStructure(Document document, YangInstanceIdentifier dataRoot, NormalizedNode node) {
if (!dataRoot.equals(ROOT)) {
return (Element) transformNormalizedNode(document,
ImmutableNodes.fromInstanceId(schemaContext.getCurrentContext(), dataRoot, node),
ROOT);
}
return (Element) transformNormalizedNode(document, node, ROOT);
}
代码示例来源:origin: org.opendaylight.controller/mdsal-netconf-connector
protected Element serializeNodeWithParentStructure(Document document, YangInstanceIdentifier dataRoot, NormalizedNode node) {
if (!dataRoot.equals(ROOT)) {
return (Element) transformNormalizedNode(document,
ImmutableNodes.fromInstanceId(schemaContext.getCurrentContext(), dataRoot, node),
ROOT);
}
return (Element) transformNormalizedNode(document, node, ROOT);
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
if (!routeTableIdentifier.equals(childIdentifier.getParent().getParent().getParent())) {
processRoutesTable(child, childIdentifier, tx, routeTableIdentifier);
break;
代码示例来源:origin: io.fd.honeycomb/data-impl
if (checkNotNull(yangInstanceIdentifier).equals(YangInstanceIdentifier.EMPTY)) {
value = readRoot(ctx);
} else {
内容来源于网络,如有侵权,请联系作者删除!