gpt4 book ai didi

org.onosproject.yang.compiler.datamodel.YangRangeRestriction.()方法的使用及代码示例

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

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

YangRangeRestriction.<init>介绍

[英]Creates YANG range restriction object with range value.
[中]创建具有范围值的范围限制对象。

代码示例

代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel

/**
 * Creates a YANG length restriction object.
 */
public YangLengthRestriction() {
  setLengthRestriction(new YangRangeRestriction<>(null));
  yangAppErrorInfo = new YangAppErrorInfo();
}

代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel

/**
 * Returns decimal64 default range restriction based on fraction-digits.
 * If range restriction is not provided then this default range value will be applicable.
 *
 * @return range restriction
 * @throws DataModelException a violation of data model rules
 */
public YangRangeRestriction getDefaultRangeRestriction() throws DataModelException {
  YangRangeRestriction refRangeRestriction = new YangRangeRestriction(null);
  YangRangeInterval rangeInterval = new YangRangeInterval<>();
  rangeInterval.setCharPosition(getCharPosition());
  rangeInterval.setLineNumber(getLineNumber());
  rangeInterval.setFileName(getFileName());
  FractionDigits.Range range = FractionDigits.getRange(fractionDigit);
  rangeInterval.setStartValue(new YangDecimal64(new BigDecimal((range.getMin()))));
  rangeInterval.setEndValue(new YangDecimal64(new BigDecimal((range.getMax()))));
  refRangeRestriction.addRangeRestrictionInterval(rangeInterval);
  return refRangeRestriction;
}

代码示例来源:origin: org.onosproject/onos-yang-compiler-parser

YangDataTypes dataType = type.getDataType();
YangRangeRestriction ranRes = new YangRangeRestriction(txt);
ranRes.setFileName(lis.getFileName());
ranRes.setCharPosition(pos);

代码示例来源:origin: org.onosproject/onos-yang-compiler-parser

YangDataTypes dataType = type.getDataType();
YangRangeRestriction lenRes = new YangRangeRestriction(txt);
lenRes.setFileName(lis.getFileName());
lenRes.setCharPosition(pos);

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