gpt4 book ai didi

org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIdentifier类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 06:22:49 27 4
gpt4 key购买 nike

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

YangIdentifier介绍

[英]A YANG identifier string as defined by the 'identifier' rule in Section 12 of RFC 6020. An identifier must start with an alphabetic character or an underscore followed by an arbitrary sequence of alphabetic or numeric characters, underscores, hyphens, or dots. A YANG identifier MUST NOT start with any possible combination of the lowercase or uppercase character sequence 'xml'.
[中]

代码示例

代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-yang-types

public static YangIdentifier getDefaultInstance(String defaultValue) {
  return new YangIdentifier(defaultValue);
}

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-yang-types-20130715

@ConstructorProperties("value")
public YangIdentifier(java.lang.String _value) {
  if (_value != null) {
    check_valueLength(_value);
    }

  Preconditions.checkNotNull(_value, "Supplied value may not be null");

    for (Pattern p : patterns) {
      Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p);
    }

  this._value = _value;
}

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-restconf

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((_name == null) ? 0 : _name.hashCode());
  result = prime * result + ((_revision == null) ? 0 : _revision.hashCode());
  return result;
}

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-restconf

@Override
public boolean equals(java.lang.Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  ModuleKey other = (ModuleKey) obj;
  if (_name == null) {
    if (other._name != null) {
      return false;
    }
  } else if(!_name.equals(other._name)) {
    return false;
  }
  if (_revision == null) {
    if (other._revision != null) {
      return false;
    }
  } else if(!_revision.equals(other._revision)) {
    return false;
  }
  return true;
}

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-restconf

public ModuleBuilder setName(YangIdentifier value) {
  if (value != null) {
    check_nameLength(value.getValue());
  }
  this._name = value;
  return this;
}
/**

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-restconf

@Override
public int hashCode() {
  if (hashValid) {
    return hash;
  }

  final int prime = 31;
  int result = 1;
  result = prime * result + ((_deviation == null) ? 0 : _deviation.hashCode());
  result = prime * result + ((_feature == null) ? 0 : _feature.hashCode());
  result = prime * result + ((_key == null) ? 0 : _key.hashCode());
  result = prime * result + ((_name == null) ? 0 : _name.hashCode());
  result = prime * result + ((_namespace == null) ? 0 : _namespace.hashCode());
  result = prime * result + ((_revision == null) ? 0 : _revision.hashCode());
  result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());

  hash = result;
  hashValid = true;
  return result;
}

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-restconf

return false;
} else if(!_name.equals(other.getName())) {
  return false;

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-yang-types-20130715

public static YangIdentifier getDefaultInstance(String defaultValue) {
  return new YangIdentifier(defaultValue);
}

代码示例来源:origin: org.opendaylight.mdsal.model/ietf-yang-types-20130715

@ConstructorProperties("value")
public YangIdentifier(java.lang.String _value) {
  if (_value != null) {
    check_valueLength(_value);
    }

  Preconditions.checkNotNull(_value, "Supplied value may not be null");

    for (Pattern p : patterns) {
      Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p);
    }

  this._value = _value;
}

代码示例来源:origin: org.opendaylight.coretutorials/openconfig-bgp

public static YangIdentifier getDefaultInstance(String defaultValue) {
  return new YangIdentifier(defaultValue);
}

代码示例来源:origin: org.opendaylight.coretutorials/openconfig-bgp

@ConstructorProperties("value")
public YangIdentifier(java.lang.String _value) {
  if (_value != null) {
    check_valueLength(_value);
    }

  Preconditions.checkNotNull(_value, "Supplied value may not be null");

    for (Pattern p : patterns) {
      Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p);
    }

  this._value = _value;
}

代码示例来源:origin: org.opendaylight.mdsal.model/ietf-yang-types-20130715

public static YangIdentifier getDefaultInstance(String defaultValue) {
  return new YangIdentifier(defaultValue);
}

代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-yang-types

@ConstructorProperties("value")
public YangIdentifier(String _value) {
  if (_value != null) {
    check_valueLength(_value);
  }

  Objects.requireNonNull(_value, "Supplied value may not be null");
  CodeHelpers.checkPattern(_value, patterns, regexes);

  this._value = _value;
}

代码示例来源:origin: org.opendaylight.netconf/mdsal-netconf-yang-library

private Submodules createSubmodulesForModule(final Module module) {
    final List<Submodule> submodulesList = Lists.newArrayList();
    for (final Module subModule : module.getSubmodules()) {
      final SubmoduleBuilder subModuleEntryBuilder = new SubmoduleBuilder();
      subModuleEntryBuilder.setName(new YangIdentifier(subModule.getName()))
          .setRevision(new OptionalRevision(SimpleDateFormatUtil.getRevisionFormat().format(subModule.getRevision())));
      submodulesList.add(subModuleEntryBuilder.build());
    }

    return  new SubmodulesBuilder().setSubmodule(submodulesList).build();
  }
}

代码示例来源:origin: org.opendaylight.netconf/mdsal-netconf-yang-library

private org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160409.module.list.Module createModuleEntryFromModule(final Module module) {
  final ModuleBuilder moduleBuilder = new ModuleBuilder();
  // TODO Conformance type is always set to Implement value, but it should it really be like this?
  // TODO Add also deviations and features lists to module entries
  moduleBuilder.setName(new YangIdentifier(module.getName()))
      .setRevision(new OptionalRevision(SimpleDateFormatUtil.getRevisionFormat().format(module.getRevision())))
      .setNamespace(new Uri(module.getNamespace().toString()))
      .setConformanceType(ConformanceType.Implement)
      .setSubmodules(createSubmodulesForModule(module));
  return moduleBuilder.build();
}

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