org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.getKey()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(245)

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

Interface.getKey介绍

[英]Returns Primary Key of Yang List Type
[中]返回列表类型的主键

代码示例

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

  1. return false;
  2. if (!Objects.equals(_key, other.getKey())) {
  3. return false;

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

  1. public InterfaceBuilder(Interface base) {
  2. if (base.getKey() == null) {
  3. this._key = new InterfaceKey(
  4. base.getName()
  5. );
  6. this._name = base.getName();
  7. } else {
  8. this._key = base.getKey();
  9. this._name = _key.getName();
  10. }
  11. this._description = base.getDescription();
  12. this._linkUpDownTrapEnable = base.getLinkUpDownTrapEnable();
  13. this._type = base.getType();
  14. this._enabled = base.isEnabled();
  15. if (base instanceof InterfaceImpl) {
  16. InterfaceImpl impl = (InterfaceImpl) base;
  17. if (!impl.augmentation.isEmpty()) {
  18. this.augmentation = new HashMap<>(impl.augmentation);
  19. }
  20. } else if (base instanceof AugmentationHolder) {
  21. @SuppressWarnings("unchecked")
  22. AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface>) base;
  23. if (!casted.augmentations().isEmpty()) {
  24. this.augmentation = new HashMap<>(casted.augmentations());
  25. }
  26. }
  27. }

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

  1. public InterfaceBuilder(Interface base) {
  2. if (base.getKey() == null) {
  3. this._key = new InterfaceKey(
  4. base.getName()
  5. );
  6. this._name = base.getName();
  7. } else {
  8. this._key = base.getKey();
  9. this._name = _key.getName();
  10. }
  11. this._description = base.getDescription();
  12. this._linkUpDownTrapEnable = base.getLinkUpDownTrapEnable();
  13. this._type = base.getType();
  14. this._enabled = base.isEnabled();
  15. if (base instanceof InterfaceImpl) {
  16. InterfaceImpl impl = (InterfaceImpl) base;
  17. if (!impl.augmentation.isEmpty()) {
  18. this.augmentation = new HashMap<>(impl.augmentation);
  19. }
  20. } else if (base instanceof AugmentationHolder) {
  21. @SuppressWarnings("unchecked")
  22. AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface>) base;
  23. if (!casted.augmentations().isEmpty()) {
  24. this.augmentation = new HashMap<>(casted.augmentations());
  25. }
  26. }
  27. }

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

  1. if (other.getKey() != null) {
  2. return false;
  3. } else if(!_key.equals(other.getKey())) {
  4. return false;

相关文章