Lorenz 0.5.0 has enjoyed a long development process (beginning the 1st of September!), and packs a bundle of cool changes. The most notable being the change of package, from me.jamiemansfield.lorenz to org.cadixdev.lorenz.


The long put-off modularisation has finally arrived - with the Enigma, JAM, and Kin mapping formats being given their own modules.

  • Enigma: org.cadixdev:lorenz-io-enigma:0.5.0
  • JAM: org.cadixdev:lorenz-io-jam:0.5.0
  • Kin: org.cadixdev:lorenz-io-kin:0.5.0

Mapping formats can be introduced through service providers, and MappingFormats will populate a registry with all the formats found. You can get a mapping format, like the following:

final MappingFormat enigma = MappingFormats.byId("enigma");
final MappingFormat jam    = MappingFormats.byId("jam");
final MappingFormat kin    = MappingFormats.byId("kin");

Merging and reversing

Mapping sets can now be reversed (A->B -> B->A), and mapping sets merged (A->B + B->C = A->C). This can be achieved like the following.

// let a be a MappingSet
// let b be a MappingSet

final MappingSet reversed = a.reverse();
final MappingSet merged = a.merge(b);

Extension Data

Lorenz now supports adding extension data to the mapping model (no existing formats serialise this information).

static final ExtensionKey<String> EXTRA_NAME = new ExtensionKey<>(String.class, "extra_name");

final MappingSet mappings = new MappingSet();
mappings.set(EXTRA_NAME, "Beep Boop");
mappings.get(EXTRA_NAME).get(); // Beep Boop