if (!Objects.equals(_explicitLocatorPath, other.getExplicitLocatorPath())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
public ExplicitLocatorPathBuilder(ExplicitLocatorPath base) { this._explicitLocatorPath = base.getExplicitLocatorPath(); if (base instanceof ExplicitLocatorPathImpl) { ExplicitLocatorPathImpl impl = (ExplicitLocatorPathImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<ExplicitLocatorPath>>, Augmentation<ExplicitLocatorPath>> aug =((AugmentationHolder<ExplicitLocatorPath>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
public ExplicitLocatorPathBuilder(ExplicitLocatorPath base) { this._explicitLocatorPath = base.getExplicitLocatorPath(); if (base instanceof ExplicitLocatorPathImpl) { ExplicitLocatorPathImpl impl = (ExplicitLocatorPathImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<ExplicitLocatorPath> casted =(AugmentationHolder<ExplicitLocatorPath>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (!Objects.equals(_explicitLocatorPath, other.getExplicitLocatorPath())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
private SimpleAddress getNextELPHop(ExplicitLocatorPath elp, List<ItrRloc> itrRlocs) { SimpleAddress nextHop = null; List<Hop> hops = elp.getExplicitLocatorPath().getHop(); if (hops != null && hops.size() > 0) { // By default we return the first hop nextHop = hops.get(0).getAddress(); for (Hop hop : hops) { Address hopAddress = LispAddressUtil.addressFromSimpleAddress(hop.getAddress()); for (ItrRloc itrRloc : itrRlocs) { if (itrRloc.getRloc().getAddress().equals(hopAddress)) { int iterator = hops.indexOf(hop); if (iterator < hops.size() - 1) { nextHop = hops.get(iterator + 1).getAddress(); return nextHop; } } } } } return nextHop; }
} else if (rloc.getAddress() instanceof ExplicitLocatorPath) { ExplicitLocatorPath elp = (ExplicitLocatorPath) rloc.getAddress(); List<Hop> hops = elp.getExplicitLocatorPath().getHop();