public HopBuilder(Hop base) { this.key = base.key(); this._hopId = base.getHopId(); this._address = base.getAddress(); this._lrsBits = base.getLrsBits(); if (base instanceof HopImpl) { HopImpl impl = (HopImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<Hop>>, Augmentation<Hop>> aug =((AugmentationHolder<Hop>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
return false; if (!Objects.equals(_lrsBits, other.getLrsBits())) { return false;
return false; if (!Objects.equals(_lrsBits, other.getLrsBits())) { return false;
public HopBuilder(Hop base) { if (base.key() == null) { this.key = new HopKey( base.getHopId() ); this._hopId = base.getHopId(); } else { this.key = base.key(); this._hopId = key.getHopId(); } this._address = base.getAddress(); this._lrsBits = base.getLrsBits(); if (base instanceof HopImpl) { HopImpl impl = (HopImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<Hop> casted =(AugmentationHolder<Hop>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }