void (String pathInJar) { String myPathInJarBefore = getMyPathInJar(); this.update( () -> myPathInJar = pathInJar, (builder, entity) -> { if (myPathInJarBefore.equals(pathInJar)) return; builder.modifyEntity(ExtractedDirectoryPackagingElementEntity.Builder.class, entity, ent -> { ent.setPathInArchive(pathInJar); return Unit.INSTANCE; }); }); }