From 74c9b4403d5f7acc5d45376b3788618cb89445d8 Mon Sep 17 00:00:00 2001 From: JPANZO Date: Sat, 5 Feb 2022 14:56:39 +0100 Subject: [PATCH] Changes in the interface "chooseOption" -> "getItemList". --- src/main/java/device/CDPlayer.java | 5 +++-- src/main/java/device/Device.java | 5 ++++- src/main/java/device/RadioPlayer.java | 5 +++-- src/main/java/device/UsbPlayer.java | 5 +++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/device/CDPlayer.java b/src/main/java/device/CDPlayer.java index 4121a37..366ac5f 100644 --- a/src/main/java/device/CDPlayer.java +++ b/src/main/java/device/CDPlayer.java @@ -37,10 +37,11 @@ public class CDPlayer implements Device { } @Override - public void chooseOption(String opt) { - + public String[] getItemList() { + return new String[0]; } + @Override public String play() { return null; diff --git a/src/main/java/device/Device.java b/src/main/java/device/Device.java index 9b14cd3..621e540 100644 --- a/src/main/java/device/Device.java +++ b/src/main/java/device/Device.java @@ -8,8 +8,11 @@ public interface Device { void next(); void prev(); String getInfoText(); + //returns an array with Method-Names to bee listed String[] getOptions(); - void chooseOption(String opt); + //returns an array with contents to bee played + String[] getItemList(); + String play(); diff --git a/src/main/java/device/RadioPlayer.java b/src/main/java/device/RadioPlayer.java index d1377ae..374e178 100644 --- a/src/main/java/device/RadioPlayer.java +++ b/src/main/java/device/RadioPlayer.java @@ -54,10 +54,11 @@ public class RadioPlayer implements Device { } @Override - public void chooseOption(String opt) { - + public String[] getItemList() { + return new String[0]; } + @Override public String play() { return null; diff --git a/src/main/java/device/UsbPlayer.java b/src/main/java/device/UsbPlayer.java index c3bca62..a9a6509 100644 --- a/src/main/java/device/UsbPlayer.java +++ b/src/main/java/device/UsbPlayer.java @@ -58,10 +58,11 @@ public class UsbPlayer implements Device { } @Override - public void chooseOption(String opt) { - + public String[] getItemList() { + return new String[0]; } + @Override public String play() { return null;