> I was thinking that something like
> Compress.getInstance(String compressorType);
> like Crypto would be nice.
> This way you can get a unique "entry point" for every compression algorithm
> that can provide its own methods to compress/decompress/add files etc etc.
you are speaking of a factory method.
I allready thought about it. Besides:
Compress.getInstance(String compressorType);
there could be also a
Compress.getInstance(File compressedFile);
which loads a compressed file with the correct Compressor.
Returntype of getInstance could be Compressor, which is the interface of
an concrete algorithm implementation.
Thx,
- Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|