Module org.refcodes.factory
Package org.refcodes.factory
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>
ThePackager
interface defines methods to pack instances and return the packed, wrapped or boxed instances. Any data being packed withtoPackaged(Object)
must be unpackable with the according counterpart methodPackager.Extractor.toExtracted(Object)
without loss of information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description 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.static interface
Packager.PackageProcessor<UNPACK,PACK,UNPACKEXC extends Exception,PACKEXC extends Exception>
ThePackager.PackageProcessor
type combines aPackager
with anPackager.Extractor
to package and extract in one module.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PACK
toPackaged(UNPACK aUnpacked)
Packs the provided instance, e.g. it is wrapped or boxed with additional information.
-