picasso.util
Class NamedCommand<T>

java.lang.Object
  extended by picasso.util.NamedCommand<T>
All Implemented Interfaces:
Command<T>

public class NamedCommand<T>
extends java.lang.Object
implements Command<T>

A command with a name (e.g., to display on a button)

Author:
Robert C Duvall

Constructor Summary
NamedCommand(java.lang.String name, Command<T> action)
          Create command with a name and an action.
 
Method Summary
 void execute(T target)
          Run the given command.
 java.lang.String getName()
          Returns name of this command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedCommand

public NamedCommand(java.lang.String name,
                    Command<T> action)
Create command with a name and an action.

Method Detail

getName

public java.lang.String getName()
Returns name of this command.


execute

public void execute(T target)
Run the given command.

Specified by:
execute in interface Command<T>