Interface Packager.Extractor<PACK,​UNPACK,​UNPACKEXC extends Exception>

  • Type Parameters:
    UNPACK - The type of the unpacked data.
    PACK - The type of the packed data.
    UNPACKEXC - The exception being thrown when unpacking failed.
    All Known Subinterfaces:
    Packager.PackageProcessor<UNPACK,​PACK,​UNPACKEXC,​PACKEXC>
    Enclosing interface:
    Packager<UNPACK,​PACK,​PACKEXC extends Exception>

    public static interface Packager.Extractor<PACK,​UNPACK,​UNPACKEXC extends Exception>
    The Packager.Extractor interface defines methods to unpack instances and return the unpacked, unwrapped or unboxed instances. Any data being packed with Packager.toPackaged(Object) must be unpackable with the according counterpart method toExtracted(Object) without loss of information.
    • Method Detail

      • toExtracted

        UNPACK toExtracted​(PACK aPacked)
                    throws UNPACKEXC extends Exception
        Unpacks an instance packed with the the Packager.toPackaged(Object) operation Depending on the implementation and the return type, as a result a new data instance is returned or the same instance is being modified (and returned).
        Parameters:
        aPacked - The packed data to be unpacked.
        Returns:
        The unpacked data.
        Throws:
        UNPACKEXC - thrown in case unpacking the data failed.
        UNPACKEXC extends Exception