public IdentityBuilder(Identity base) { this._local = base.getLocal(); this._remote = base.getRemote(); if (base instanceof IdentityImpl) { IdentityImpl impl = (IdentityImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<Identity> casted =(AugmentationHolder<Identity>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (!Objects.equals(_local, other.getLocal())) { return false; if (!Objects.equals(_remote, other.getRemote())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
@Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Identity> id, @Nonnull final Identity dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { String name = id.firstKeyOf(Policy.class).getName(); if (dataAfter.getLocal() != null) { setProfileId(id, name, dataAfter.getLocal().getIdentity(), true); } if (dataAfter.getRemote() != null) { setProfileId(id, name, dataAfter.getRemote().getIdentity(), false); } }