本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr
类的一些代码示例,展示了YangNaryExpr
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangNaryExpr
类的具体详情如下:
包路径:org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr
类名称:YangNaryExpr
暂无
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-api
@Override
public final String toString() {
return MoreObjects.toStringHelper(YangNaryExpr.class)
.add("operator", getOperator())
.add("expressions", getExpressions())
.toString();
}
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-api
@Override
public final int hashCode() {
return Objects.hash(getOperator(), expressions);
}
代码示例来源:origin: opendaylight/yangtools
@Override
public final int hashCode() {
return Objects.hash(getOperator(), expressions);
}
代码示例来源:origin: opendaylight/yangtools
@Override
public final String toString() {
return MoreObjects.toStringHelper(YangNaryExpr.class)
.add("operator", getOperator())
.add("expressions", getExpressions())
.toString();
}
}
代码示例来源:origin: opendaylight/yangtools
@Override
public final boolean equals(final @Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof YangNaryExpr)) {
return false;
}
final YangNaryExpr other = (YangNaryExpr) obj;
return getOperator().equals(other.getOperator()) && expressions.equals(other.expressions);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-impl
private YangExpr parseUnion(final UnionExprNoRootContext expr) {
final ParseTree first = expr.getChild(0);
final YangExpr path;
if (first instanceof PathExprNoRootContext) {
path = parsePathExpr((PathExprNoRootContext) first);
if (expr.getChildCount() == 1) {
return path;
}
} else {
path = YangLocationPath.root();
}
verifyChildCount(expr, 3);
final YangExpr union = parseUnion(getChild(expr, UnionExprNoRootContext.class, 2));
// Deduplicate expressions so we do not perform useless unioning
final Set<YangExpr> expressions = new LinkedHashSet<>();
expressions.add(path);
if (union instanceof YangNaryExpr) {
// If the result is a union expression, integrate it into this expression
final YangNaryExpr nary = (YangNaryExpr) union;
if (nary.getOperator() == YangNaryOperator.UNION) {
expressions.addAll(nary.getExpressions());
} else {
expressions.add(union);
}
} else {
expressions.add(union);
}
return YangNaryOperator.UNION.exprWith(expressions);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-api
@Override
public final boolean equals(final @Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof YangNaryExpr)) {
return false;
}
final YangNaryExpr other = (YangNaryExpr) obj;
return getOperator().equals(other.getOperator()) && expressions.equals(other.expressions);
}
代码示例来源:origin: opendaylight/yangtools
private YangExpr parseUnion(final UnionExprNoRootContext expr) {
final ParseTree first = expr.getChild(0);
final YangExpr path;
if (first instanceof PathExprNoRootContext) {
path = parsePathExpr((PathExprNoRootContext) first);
if (expr.getChildCount() == 1) {
return path;
}
} else {
path = YangLocationPath.root();
}
verifyChildCount(expr, 3);
final YangExpr union = parseUnion(getChild(expr, UnionExprNoRootContext.class, 2));
// Deduplicate expressions so we do not perform useless unioning
final Set<YangExpr> expressions = new LinkedHashSet<>();
expressions.add(path);
if (union instanceof YangNaryExpr) {
// If the result is a union expression, integrate it into this expression
final YangNaryExpr nary = (YangNaryExpr) union;
if (nary.getOperator() == YangNaryOperator.UNION) {
expressions.addAll(nary.getExpressions());
} else {
expressions.add(union);
}
} else {
expressions.add(union);
}
return YangNaryOperator.UNION.exprWith(expressions);
}
内容来源于网络,如有侵权,请联系作者删除!