Module org.refcodes.factory
Package org.refcodes.factory
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>
public static interface Packager.Extractor<PACK,UNPACK,UNPACKEXC extends Exception>
ThePackager.Extractor
interface defines methods to unpack instances and return the unpacked, unwrapped or unboxed instances. Any data being packed withPackager.toPackaged(Object)
must be unpackable with the according counterpart methodtoExtracted(Object)
without loss of information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default UNPACK
fromPackaged(PACK aPacked)
Method for potential better code expressiveness, the same astoExtracted(Object)
.UNPACK
toExtracted(PACK aPacked)
Unpacks an instance packed with the thePackager.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).
-
-
-
Method Detail
-
toExtracted
UNPACK toExtracted(PACK aPacked) throws UNPACKEXC extends Exception
Unpacks an instance packed with the thePackager.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).
-
fromPackaged
default UNPACK fromPackaged(PACK aPacked) throws UNPACKEXC extends Exception
Method for potential better code expressiveness, the same astoExtracted(Object)
.
-
-