public InstanceIdBuilder(InstanceId base) { this._instanceId = base.getInstanceId(); if (base instanceof InstanceIdImpl) { InstanceIdImpl impl = (InstanceIdImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<InstanceId>>, Augmentation<InstanceId>> aug =((AugmentationHolder<InstanceId>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
if (!Objects.equals(_instanceId, other.getInstanceId())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
if (!Objects.equals(_instanceId, other.getInstanceId())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
public InstanceIdBuilder(InstanceId base) { this._instanceId = base.getInstanceId(); if (base instanceof InstanceIdImpl) { InstanceIdImpl impl = (InstanceIdImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<InstanceId> casted =(AugmentationHolder<InstanceId>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private static long getLispInstanceId(Eid eid) { Address address = eid.getAddress(); if (address instanceof InstanceId) { return ((InstanceId) address).getInstanceId().getIid().getValue(); } else if (eid.getVirtualNetworkId() != null) { return eid.getVirtualNetworkId().getValue(); } return 0L; } }