gpt4 book ai didi

org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr.getOperator()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:21:41 26 4
gpt4 key购买 nike

本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr.getOperator()方法的一些代码示例,展示了YangNaryExpr.getOperator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangNaryExpr.getOperator()方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr
类名称:YangNaryExpr
方法名:getOperator

YangNaryExpr.getOperator介绍

暂无

代码示例

代码示例来源: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 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-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: org.opendaylight.yangtools/yang-xpath-api

@Override
  public final String toString() {
    return MoreObjects.toStringHelper(YangNaryExpr.class)
        .add("operator", getOperator())
        .add("expressions", getExpressions())
        .toString();
  }
}

代码示例来源:origin: opendaylight/yangtools

@Override
  public final String toString() {
    return MoreObjects.toStringHelper(YangNaryExpr.class)
        .add("operator", getOperator())
        .add("expressions", getExpressions())
        .toString();
  }
}

代码示例来源: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: 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);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com