interface TV {
void show();
}
enum TVFactory {
COLOR {
@Override
TV create() {
return () -> {
System.out.println("Showing content in Color ... ");
};
}
},
LED {
@Override
TV create() {
return () -> {
System.out.println("Showing content using LED ... ");
};
}
},
// etc ...
;
abstract TV create();
}