Sync Bridge to Java 25: H6 file labels, README mapping

This commit is contained in:
2026-06-24 14:27:07 +05:30
parent 8471913dbd
commit 4091345b20
8 changed files with 58 additions and 89 deletions

View File

@@ -1,23 +1,19 @@
package bridge;
/**
* Refined Abstraction — extends RemoteControl with extra features.
* This is how you vary the "abstraction" side independently of the
* "implementation" side. Both TV and Radio work with this remote,
* even though they know nothing about it.
* Refined Abstraction — extends RemoteControl with additional capabilities.
*
* The device hierarchy doesn't change at all. TV and Radio
* automatically support mute() and jumpToChannel() because they
* implement Device. Zero new code on the implementation side.
*/
public class AdvancedRemote extends RemoteControl {
public AdvancedRemote(Device device) {
super(device);
}
// Extra feature not in the basic remote
public void mute() {
System.out.println(" Muting " + device.getName());
device.setVolume(0);
}
public void jumpToChannel(int channel) {
System.out.println(" Jumping to channel " + channel);
device.setChannel(channel);