Facade: split subsystem into one class per file, sync post code blocks to Java 25, add README mapping
This commit is contained in:
10
02-structural/facade/CodecFactory.java
Normal file
10
02-structural/facade/CodecFactory.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package facade;
|
||||
|
||||
/** CodecFactory — inspects a VideoFile and returns the matching Codec. */
|
||||
class CodecFactory {
|
||||
static Codec extract(VideoFile file) {
|
||||
System.out.println(" CodecFactory: extracting codec from " + file.getFilename());
|
||||
if ("mpeg4".equals(file.getCodecType())) return new MPEG4CompressionCodec();
|
||||
return new OggCompressionCodec();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user