org.bff.javampd
Class MPDCommand

java.lang.Object
  extended by org.bff.javampd.MPDCommand

public class MPDCommand
extends java.lang.Object

MPDCommand represents a command along with optional command paramaters to be sent to a MPD server.


Constructor Summary
MPDCommand(java.lang.String command)
          Constructor for MPD command for a command requiring no parameters.
MPDCommand(java.lang.String command, java.lang.String param)
          Constructor for MPD command for a command requiring a single parameter.
MPDCommand(java.lang.String command, java.lang.String[] params)
          Constructor for MPD command for a command requiring more than 1 paramaeter.
 
Method Summary
 java.lang.String getCommand()
          Returns the command od this object.
 java.util.List<java.lang.String> getParams()
          Returns the parameter(s) of this command as a List of Strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MPDCommand

public MPDCommand(java.lang.String command)
Constructor for MPD command for a command requiring no parameters.

Parameters:
command - the parameterless command to send.

MPDCommand

public MPDCommand(java.lang.String command,
                  java.lang.String param)
Constructor for MPD command for a command requiring a single parameter.

Parameters:
command - the command to send
param - the parameter for the command

MPDCommand

public MPDCommand(java.lang.String command,
                  java.lang.String[] params)
Constructor for MPD command for a command requiring more than 1 paramaeter.

Parameters:
command - the command to send
params - the parameters to send
Method Detail

getCommand

public java.lang.String getCommand()
Returns the command od this object.

Returns:
the command

getParams

public java.util.List<java.lang.String> getParams()
Returns the parameter(s) of this command as a List of Strings. Returns null of there is no parameter for the command.

Returns:
the parameters for the command