Interface Packager<UNPACK,PACK,PACKEXC extends Exception>

Type Parameters:
UNPACK - The type of the unpacked data.
PACK - The type of the packed data.
PACKEXC - The exception being thrown when packaging failed.
All Known Subinterfaces:
Packager.PackageProcessor<UNPACK,PACK,UNPACKEXC,PACKEXC>

public interface Packager<UNPACK,PACK,PACKEXC extends Exception>
The Packager interface defines methods to pack instances and return the packed, wrapped or boxed instances. Any data being packed with toPackaged(Object) must be unpackable with the according counterpart method Packager.Extractor.toExtracted(Object) without loss of information.
  • Method Details

    • toPackaged

      PACK toPackaged(UNPACK aUnpacked) throws PACKEXC
      Packs the provided instance, e.g. it is wrapped or boxed with additional information.
      Parameters:
      aUnpacked - The data to be packed (enriched).
      Returns:
      The packed data.
      Throws:
      PACKEXC - thrown in case packing the data failed.