From 58a8028bd5af473b24538c50395406d5a2e9573f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Thu, 14 Jun 2012 11:40:08 +0200 Subject: [PATCH] cleanup --- src/de/ctdo/crashtest/Steuerung.java | 21 +---- src/de/ctdo/crashtest/TestClass.java | 57 ++++-------- .../ctdo/crashtest/domotics/BuntiClient.java | 2 +- .../ctdo/crashtest/domotics/IBuntiClient.java | 4 - .../ctdo/crashtest/domotics/IRelaisboard.java | 3 - .../ctdo/crashtest/domotics/Relaisboard.java | 55 ++---------- src/de/ctdo/crashtest/game/IStatemachine.java | 2 - src/de/ctdo/crashtest/game/Statemachine.java | 5 -- src/de/ctdo/crashtest/game/TheGame.java | 89 +++++++++---------- .../ctdo/crashtest/gui/GuiEventListener.java | 8 -- src/de/ctdo/crashtest/gui/IGuiControl.java | 8 -- src/de/ctdo/crashtest/gui/MainGui.java | 16 +--- src/de/ctdo/crashtest/irc/IIrcClient.java | 4 - .../ctdo/crashtest/irc/IRCEventListener.java | 4 - src/de/ctdo/crashtest/irc/IrcClient.java | 2 +- src/de/ctdo/crashtest/log/ILogger.java | 5 -- src/de/ctdo/crashtest/log/Logger.java | 2 +- src/de/ctdo/crashtest/mpd/IMPDController.java | 4 - 18 files changed, 74 insertions(+), 217 deletions(-) diff --git a/src/de/ctdo/crashtest/Steuerung.java b/src/de/ctdo/crashtest/Steuerung.java index 960c7a8..ddf6eaf 100644 --- a/src/de/ctdo/crashtest/Steuerung.java +++ b/src/de/ctdo/crashtest/Steuerung.java @@ -1,29 +1,10 @@ package de.ctdo.crashtest; - import de.ctdo.crashtest.game.TheGame; -import de.ctdo.crashtest.gui.IGuiControl; import de.ctdo.crashtest.gui.MainGui; public class Steuerung { - - private TheGame game; - private IGuiControl gui; - - public static void main(String args[]) { - - new Steuerung(); - + new TheGame(new MainGui()); } - - public Steuerung() { - gui = new MainGui(); - - game = new TheGame(gui); - - - } - - } diff --git a/src/de/ctdo/crashtest/TestClass.java b/src/de/ctdo/crashtest/TestClass.java index e36b4f6..eb89532 100644 --- a/src/de/ctdo/crashtest/TestClass.java +++ b/src/de/ctdo/crashtest/TestClass.java @@ -1,49 +1,28 @@ package de.ctdo.crashtest; -import de.ctdo.crashtest.domotics.BuntiClient; -import de.ctdo.crashtest.domotics.IBuntiClient; -import de.ctdo.crashtest.domotics.IRelaisboard; -import de.ctdo.crashtest.domotics.Relaisboard; -import de.ctdo.crashtest.mpd.IMPDController; -import de.ctdo.crashtest.mpd.MPDController; +import de.ctdo.crashtest.gui.GuiEventListener; +import de.ctdo.crashtest.gui.MainGui; +public class TestClass implements GuiEventListener { + public TestClass() { + MainGui mg = new MainGui(); + mg.addListener(this); + mg.setCountDown(121411); + } -public class TestClass { + public static void main(String args[]) { + new TestClass(); + } - - - public static void main(String args[]) throws InterruptedException { - - //IRelaisboard relaisboard = new Relaisboard("/dev/ttyUSB0"); - //relaisboard.open(); - //relaisboard.close(); - - IBuntiClient bunti = new BuntiClient("bunti.ctdo.de", 8080); - - for(int i = 0; i < 10; i++) { - bunti.setPar56(0, 255, 0, 0); - bunti.setPar56(1, 0, 255, 0); - bunti.setPar56(2, 0, 255, 0); - bunti.setPar56(3, 255, 0, 0); - Thread.sleep(500); - bunti.setPar56(0, 0, 0, 255); - bunti.setPar56(1, 255, 255, 0); - bunti.setPar56(2, 255, 255, 0); - bunti.setPar56(3, 0, 0, 255); - Thread.sleep(500); - bunti.setPar56(0, 255, 128, 0); - bunti.setPar56(1, 0, 255, 255); - bunti.setPar56(2, 0, 255, 255); - bunti.setPar56(3, 255, 128, 0); - Thread.sleep(500); - bunti.setPar56(0, 0, 255, 255); - bunti.setPar56(1, 0, 255, 0); - bunti.setPar56(2, 0, 255, 0); - bunti.setPar56(3, 0, 255, 255); - Thread.sleep(500); - } + @Override + public void keyPress(char key) { } + @Override + public void windowClosing() { + System.out.println("closing"); + System.exit(0); + } } diff --git a/src/de/ctdo/crashtest/domotics/BuntiClient.java b/src/de/ctdo/crashtest/domotics/BuntiClient.java index 6895ff1..26dde53 100644 --- a/src/de/ctdo/crashtest/domotics/BuntiClient.java +++ b/src/de/ctdo/crashtest/domotics/BuntiClient.java @@ -11,7 +11,7 @@ import java.io.*; import java.net.Socket; public class BuntiClient implements IBuntiClient { - private String baseAddress; + private final String baseAddress; //private final HttpClient client = new DefaultHttpClient(); public BuntiClient(String server, int port) { diff --git a/src/de/ctdo/crashtest/domotics/IBuntiClient.java b/src/de/ctdo/crashtest/domotics/IBuntiClient.java index ddeb5db..3a6943e 100644 --- a/src/de/ctdo/crashtest/domotics/IBuntiClient.java +++ b/src/de/ctdo/crashtest/domotics/IBuntiClient.java @@ -1,9 +1,5 @@ package de.ctdo.crashtest.domotics; -/** - * @author: lucas - * @date: 01.06.12 14:25 - */ public interface IBuntiClient { void setPar56(final int red, final int green, final int blue); void setPar56(final int par, final int red, final int green, final int blue); diff --git a/src/de/ctdo/crashtest/domotics/IRelaisboard.java b/src/de/ctdo/crashtest/domotics/IRelaisboard.java index 9be3e66..a5873de 100644 --- a/src/de/ctdo/crashtest/domotics/IRelaisboard.java +++ b/src/de/ctdo/crashtest/domotics/IRelaisboard.java @@ -1,13 +1,10 @@ package de.ctdo.crashtest.domotics; public interface IRelaisboard { - void setRelais(final int relais, final boolean state); void toggleRelais(final int relais, final int milliseconds); - void blinkRelais(final int relais, final int pause, final int count); void blinkRelais(final int relais, final int pause); void blinkRelaisStop(final int relais); boolean open(); void close(); - } diff --git a/src/de/ctdo/crashtest/domotics/Relaisboard.java b/src/de/ctdo/crashtest/domotics/Relaisboard.java index 563fb89..99170d6 100644 --- a/src/de/ctdo/crashtest/domotics/Relaisboard.java +++ b/src/de/ctdo/crashtest/domotics/Relaisboard.java @@ -12,7 +12,7 @@ public class Relaisboard implements IRelaisboard { private OutputStream outputStream; private Boolean serialPortGeoeffnet = false; private String portName = "/dev/ttyUSB0"; - private Object mLock = new Object(); + private final Object mLock = new Object(); private final Map threadMap = new ConcurrentHashMap(); private final Map stopMap = new ConcurrentHashMap(); @@ -21,7 +21,7 @@ public class Relaisboard implements IRelaisboard { } private void sendData(final int relais, final boolean state) { - synchronized (outputStream) { + synchronized (mLock) { if(relais >= 0 && relais < 8 && outputStream != null) { char charsOff[] = { 'a','b','c','d','e','f','g','h' }; char charsOn[] = { 'A','B','C','D','E','F','G','H' }; @@ -49,7 +49,7 @@ public class Relaisboard implements IRelaisboard { serialPortGeoeffnet = false; Boolean foundPort = false; - if (serialPortGeoeffnet != false) { + if (serialPortGeoeffnet) { Logger.sLog("Serialport bereits geƶffnet"); return false; } @@ -64,7 +64,7 @@ public class Relaisboard implements IRelaisboard { break; } } - if (foundPort != true) { + if (!foundPort) { Logger.sLog("Serialport nicht gefunden: " + portName); return false; } @@ -128,7 +128,7 @@ public class Relaisboard implements IRelaisboard { try { Thread.sleep(milliseconds); - } catch (InterruptedException e) { } + } catch (InterruptedException ignored) { } sendData(relais, false); } @@ -137,45 +137,6 @@ public class Relaisboard implements IRelaisboard { new Thread(r).start(); } - @Override - public void blinkRelais(final int relais, final int pause, final int count) { - if(!serialPortGeoeffnet) return; - - stopRelaisThread(relais); - - Runnable r = new Runnable() { - @Override - public void run() { - int i; - - for(i = 0; i< count; i++) { - sendData(relais, true); - - try { - Thread.sleep(pause); - } catch (InterruptedException e) { } - - if(stopMap.get(relais)) return; - - sendData(relais, false); - - try { - Thread.sleep(pause); - } catch (InterruptedException e) { } - - if(stopMap.get(relais)) return; - } - - if(stopMap.get(relais)) sendData(relais,false); // switch off afterwards - } - }; - - stopMap.put(relais, false); - Thread thread = new Thread(r); - threadMap.put(relais,thread); - thread.start(); - } - @Override public void blinkRelais(final int relais, final int pause) { if(!serialPortGeoeffnet) return; @@ -190,7 +151,7 @@ public class Relaisboard implements IRelaisboard { try { Thread.sleep(pause); - } catch (InterruptedException e) { } + } catch (InterruptedException ignored) { } if(stopMap.get(relais)) return; @@ -198,7 +159,7 @@ public class Relaisboard implements IRelaisboard { try { Thread.sleep(pause); - } catch (InterruptedException e) { } + } catch (InterruptedException ignored) { } if(stopMap.get(relais)) return; } @@ -217,7 +178,7 @@ public class Relaisboard implements IRelaisboard { } private void stopRelaisThread(final int relais) { - Thread thread = (Thread)threadMap.get(relais); + Thread thread = threadMap.get(relais); if(thread != null) { stopMap.put(relais, true); diff --git a/src/de/ctdo/crashtest/game/IStatemachine.java b/src/de/ctdo/crashtest/game/IStatemachine.java index 745eb5c..a2cd765 100644 --- a/src/de/ctdo/crashtest/game/IStatemachine.java +++ b/src/de/ctdo/crashtest/game/IStatemachine.java @@ -9,8 +9,6 @@ public interface IStatemachine { void handleInput(char input); int getTimerSecondsLast(); int getTimerSeconds(); - - void startTimer(int seconds); void stopTimer(); void pauseTimer(boolean pause); diff --git a/src/de/ctdo/crashtest/game/Statemachine.java b/src/de/ctdo/crashtest/game/Statemachine.java index b6dadbf..a92c7f8 100644 --- a/src/de/ctdo/crashtest/game/Statemachine.java +++ b/src/de/ctdo/crashtest/game/Statemachine.java @@ -40,7 +40,6 @@ public class Statemachine implements IStatemachine { private int timertSecondsLast; private int timertSeconds; - public Statemachine() { currentState = state.IDLE; statemachineListenerList = new ArrayList(); @@ -218,7 +217,6 @@ public class Statemachine implements IStatemachine { return retVal; } - private void scheduleTimer() { if(timer != null) timer.cancel(); @@ -238,7 +236,4 @@ public class Statemachine implements IStatemachine { }; timer.scheduleAtFixedRate(timerTask, 100, 100); } - - - } diff --git a/src/de/ctdo/crashtest/game/TheGame.java b/src/de/ctdo/crashtest/game/TheGame.java index 4c65819..3f9a583 100644 --- a/src/de/ctdo/crashtest/game/TheGame.java +++ b/src/de/ctdo/crashtest/game/TheGame.java @@ -7,26 +7,24 @@ import de.ctdo.crashtest.mpd.IMPDController; import de.ctdo.crashtest.mpd.MPDController; public class TheGame implements StatemachineListener, GuiEventListener, IRCEventListener { - private IGuiControl guiControl; - private IIrcClient ircClient; - private IStatemachine machine; - private IBuntiClient bunti; - private IMPDController mpdController; - private IRelaisboard relaisboard; + private final IGuiControl guiControl; + private final IIrcClient ircClient; + private final IStatemachine machine; + private final IBuntiClient bunti; + private final IMPDController mpdController; + private final IRelaisboard relaisboard; private int gamerRating = 3; private Thread discoThread; private boolean shouldStopDisco; private boolean gemActivated = false; - public TheGame(IGuiControl guiControl) { - this.guiControl = guiControl; - - this.ircClient = new IrcClient("crashtest", "#crashtest","irc.ctdo.de"); - this.bunti = new BuntiClient("bunti.ctdo.de", 8080); - this.mpdController = new MPDController("dampfradio.raum.ctdo.de"); - this.relaisboard = new Relaisboard("/dev/ttyUSB0"); - this.machine = new Statemachine(); - + public TheGame(IGuiControl guiControl1) { + guiControl = guiControl1; + ircClient = new IrcClient("crashtest", "#crashtest","irc.ctdo.de"); + bunti = new BuntiClient("bunti.ctdo.de", 8080); + mpdController = new MPDController("dampfradio.raum.ctdo.de"); + relaisboard = new Relaisboard("/dev/ttyUSB0"); + machine = new Statemachine(); initGame(); } @@ -202,7 +200,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } sayScore(); - disco(); + discoStart(); break; } @@ -234,8 +232,6 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent @Override public void keyPress(char key) { machine.handleInput(key); - //guiControl.setExtra("btn: " + key); - } /** @@ -243,10 +239,12 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent */ @Override public void windowClosing() { - machine.reset(); + discoStop(); + resetDomotics(); bunti.setPar56(0xff,0xff,0xff); ircClient.say("bye"); relaisboard.close(); + System.exit(0); } /** @@ -272,11 +270,11 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } else if(message.startsWith("relais")) { handleRelaisCommand(message); } else if(message.startsWith("disco start")) { - disco(); + discoStart(); } else if(message.startsWith("disco stop")) { discoStop(); } else if(message.startsWith("gem")) { - handleGem(); + handleGemCommand(); } else { ircClient.say("y u no use valid command?"); } @@ -305,7 +303,6 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } else if(params.startsWith("stop")) { machine.stopTimer(); guiControl.showCountDown(false); - ircClient.say("timer stopped"); } else if(params.startsWith("pause")) { machine.pauseTimer(true); } else if(params.startsWith("resume")) { @@ -314,15 +311,14 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } private void handleStateCommand(final String message) { - if(message.equals("state")) { + if(message.trim().equals("state")) { ircClient.say(machine.getCurrentState().name()); } else { String params = message.substring("state".length()).trim().toLowerCase(); Boolean ok = false; for(Statemachine.state st: Statemachine.state.values()) { - String stateName = st.name().toLowerCase(); - if(stateName.equals(params)) { + if(st.name().toLowerCase().equals(params)) { ok = true; machine.setNewState(st); break; @@ -334,7 +330,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } // Yes, it makes no sense, but I want have it anyway. For more Spass am Geraet! - private void handleGem() { + private void handleGemCommand() { if (!gemActivated) { java.util.Random random = new java.util.Random(); int scry = random.nextInt(100); @@ -352,7 +348,6 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } private void handleRelaisCommand(final String message) { - String params = message.substring("relais".length()).trim().toLowerCase(); if(params.startsWith("lamp on")) { @@ -370,13 +365,11 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent } else if(params.startsWith("lamp stop")) { relaisboard.blinkRelaisStop(2); } - - } private void handleHelpCommand(final String message) { if(message.equals("help")) { - ircClient.say("commands: help, reset, state, timer, wall, extra, score"); + ircClient.say("commands: help, reset, state, timer, wall, extra, score, relais, disco"); } else if(message.contains("reset")) { ircClient.say("resets the game to IDLE"); } else if(message.contains("state")) { @@ -413,7 +406,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent ircClient.say("control the relais board"); ircClient.say("valid commands: lamp on, lamp off, lamp blink, lamp stop, oven on, oven off, rokets"); } else if(message.contains("disco")) { - ircClient.say("party! use: disco {on,off}"); + ircClient.say("party! use: disco {start,stop}"); } else if(message.contains("gem")) { ircClient.say("you don't say?"); } else { @@ -424,38 +417,39 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent private void sayScore() { ircClient.say("stateChangeCounter: " + machine.getStateChangeCounter()); - int seconds = machine.getTimerSecondsLast(); - int seconds1 = machine.getTimerSeconds(); - int seconds2 = seconds-seconds1; + int secondsLast = machine.getTimerSecondsLast(); + int seconds = machine.getTimerSeconds(); + int secondsLeft = seconds - secondsLast; + int mins = seconds / 60; - int secs = seconds % 60; - int mins1 = seconds1 / 60; - int secs1 = seconds1 % 60; - int mins2 = seconds2 / 60; - int secs2 = seconds2 % 60; - ircClient.say("time " + mins1 + ":" + secs1 + " last: " + mins + ":" + secs + " left: " + mins2 + ":" + secs2); + int minsLast = secondsLast / 60; + int minsLeft = secondsLeft / 60; + + ircClient.say(String.format("time: %d:%02d last: %d:%02d left: %d:%02d", + mins, seconds % 60, minsLast, secondsLast % 60, minsLeft, secondsLeft % 60)); + ircClient.say("gamerRating: " + gamerRating); } private void resetDomotics() { - relaisboard.toggleRelais(2, 2000); - relaisboard.setRelais(7, true); // enable light barrier over relais - relaisboard.setRelais(6, true); // enable third green circle + relaisboard.setRelais(7, true); // enable light barrier over relais + relaisboard.setRelais(6, true); // enable third green circle + relaisboard.setRelais(2, false); // disable the lamp + relaisboard.setRelais(3, false); // disable the oven mpdController.clearPlaylist(); } - private void discoStop() { if(discoThread != null) { shouldStopDisco = true; discoThread.interrupt(); try { discoThread.join(500); - } catch (InterruptedException e) { } + } catch (InterruptedException ignored) { } } } - private void disco() { + private void discoStart() { discoStop(); Runnable r = new Runnable() { @@ -489,14 +483,13 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent if(shouldStopDisco) return; Thread.sleep(500); } - } catch (InterruptedException e) { } + } catch (InterruptedException ignored) { } } }; discoThread = new Thread(r); shouldStopDisco = false; discoThread.start(); - } } diff --git a/src/de/ctdo/crashtest/gui/GuiEventListener.java b/src/de/ctdo/crashtest/gui/GuiEventListener.java index c7bede4..7046b56 100644 --- a/src/de/ctdo/crashtest/gui/GuiEventListener.java +++ b/src/de/ctdo/crashtest/gui/GuiEventListener.java @@ -1,14 +1,6 @@ package de.ctdo.crashtest.gui; -import java.awt.event.KeyEvent; - -/** - * @author: lucas - * @date: 01.06.12 10:29 - */ public interface GuiEventListener { - void keyPress(final char key); void windowClosing(); - } diff --git a/src/de/ctdo/crashtest/gui/IGuiControl.java b/src/de/ctdo/crashtest/gui/IGuiControl.java index 6ba4aec..072c394 100644 --- a/src/de/ctdo/crashtest/gui/IGuiControl.java +++ b/src/de/ctdo/crashtest/gui/IGuiControl.java @@ -1,17 +1,9 @@ package de.ctdo.crashtest.gui; -/** - * @author: lucas - * @date: 01.06.12 10:13 - */ public interface IGuiControl { - void setWall(final String message); void setExtra(final String text); void setCountDown(final int tseconds); void showCountDown(final Boolean show); - void addListener(final GuiEventListener listener); - - } diff --git a/src/de/ctdo/crashtest/gui/MainGui.java b/src/de/ctdo/crashtest/gui/MainGui.java index cb41549..14e69ac 100644 --- a/src/de/ctdo/crashtest/gui/MainGui.java +++ b/src/de/ctdo/crashtest/gui/MainGui.java @@ -11,14 +11,11 @@ public class MainGui extends JFrame implements IGuiControl { private final JLabel countDown = new JLabel(); private final JLabel extraField = new JLabel(); private final JPanel lowerPanel = new JPanel(); - private final List listenerList = new ArrayList(); public MainGui() { initGui(); setDefaultCloseOperation(EXIT_ON_CLOSE); - - setBounds(0,0, 1280, 1024); setExtendedState(Frame.MAXIMIZED_BOTH); setUndecorated(true); @@ -33,7 +30,7 @@ public class MainGui extends JFrame implements IGuiControl { } }); - addWindowStateListener(new WindowAdapter() { + addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { for(GuiEventListener listener: listenerList) { @@ -46,18 +43,14 @@ public class MainGui extends JFrame implements IGuiControl { } private void setCountDownText(final int tseconds) { - int mins = tseconds / 600; - int secs = tseconds % 600 / 10 ; - int tsecs = tseconds % 9; - countDown.setText(" " + mins + ":" + secs + "." + tsecs); + + countDown.setText(String.format(" %d:%02d.%1d", tseconds / 600, tseconds % 600 / 10, tseconds % 9)); if(tseconds < 400) { double percentile = ((tseconds-100.0)/300.0); double red = 255.0 - percentile * 255.0; double green = 255.0 - red; -// System.out.println("red= " + red + " green=" + green + " blue="+blue); - if(red > 255) red = 255; if(red < 0) red = 0; if(green > 255) green = 255; @@ -69,7 +62,6 @@ public class MainGui extends JFrame implements IGuiControl { else { countDown.setForeground(new Color(42, 190, 0)); } - } private void initGui() { @@ -161,6 +153,4 @@ public class MainGui extends JFrame implements IGuiControl { listenerList.add(listener); } - - } diff --git a/src/de/ctdo/crashtest/irc/IIrcClient.java b/src/de/ctdo/crashtest/irc/IIrcClient.java index ac10e1c..b9cd802 100644 --- a/src/de/ctdo/crashtest/irc/IIrcClient.java +++ b/src/de/ctdo/crashtest/irc/IIrcClient.java @@ -1,9 +1,5 @@ package de.ctdo.crashtest.irc; -/** - * @author: lucas - * @date: 01.06.12 10:05 - */ public interface IIrcClient { void say(String message); void addListener(IRCEventListener listenerIRC); diff --git a/src/de/ctdo/crashtest/irc/IRCEventListener.java b/src/de/ctdo/crashtest/irc/IRCEventListener.java index 8fc9ad9..93c03d8 100644 --- a/src/de/ctdo/crashtest/irc/IRCEventListener.java +++ b/src/de/ctdo/crashtest/irc/IRCEventListener.java @@ -1,9 +1,5 @@ package de.ctdo.crashtest.irc; -/** - * @author: lucas - * @date: 01.06.12 11:49 - */ public interface IRCEventListener { void handleMessage(final String message); diff --git a/src/de/ctdo/crashtest/irc/IrcClient.java b/src/de/ctdo/crashtest/irc/IrcClient.java index 4c10f2c..32c1c0b 100644 --- a/src/de/ctdo/crashtest/irc/IrcClient.java +++ b/src/de/ctdo/crashtest/irc/IrcClient.java @@ -20,7 +20,7 @@ import java.util.List; */ public class IrcClient implements IIrcClient, jerklib.events.listeners.IRCEventListener, ILogger { private final List listenerListIRC = new ArrayList(); - private Session ircsession; + private final Session ircsession; private final String channel; public IrcClient(String nick, String channel, String server) { diff --git a/src/de/ctdo/crashtest/log/ILogger.java b/src/de/ctdo/crashtest/log/ILogger.java index 177d06b..2975f67 100644 --- a/src/de/ctdo/crashtest/log/ILogger.java +++ b/src/de/ctdo/crashtest/log/ILogger.java @@ -1,10 +1,5 @@ package de.ctdo.crashtest.log; -/** - * @author: lucas - * @date: 01.06.12 16:46 - */ public interface ILogger { - void log(String message); } diff --git a/src/de/ctdo/crashtest/log/Logger.java b/src/de/ctdo/crashtest/log/Logger.java index b1f537d..2692874 100644 --- a/src/de/ctdo/crashtest/log/Logger.java +++ b/src/de/ctdo/crashtest/log/Logger.java @@ -20,7 +20,7 @@ public class Logger { return instance; } - public void log(String message) { + private void log(String message) { System.out.println("LOG: " + message); diff --git a/src/de/ctdo/crashtest/mpd/IMPDController.java b/src/de/ctdo/crashtest/mpd/IMPDController.java index 1b5861e..adc8bce 100644 --- a/src/de/ctdo/crashtest/mpd/IMPDController.java +++ b/src/de/ctdo/crashtest/mpd/IMPDController.java @@ -1,9 +1,5 @@ package de.ctdo.crashtest.mpd; -/** - * @author: lucas - * @date: 01.06.12 10:36 - */ public interface IMPDController { void playSong(final String artist, final String title); void setVolume(final int volume);