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

x33g5p2x  于2022-02-05 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(88)

本文整理了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);

相关文章

YangRangeRestriction类方法