Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.delegate
Class DelegateProviderSupport

    java.lang.Object
      com.pietschy.command.delegate.DelegateProviderSupport

All Implemented Interfaces:
  DelegateProvider

     class DelegateProviderSupport

extends java.lang.Object
implements DelegateProvider

A simple implementation of `DelegateProvider`. This class is useful in cases where a `CommandContainer` isn't required.

Constructor Summary
`DelegateProviderSupport()`

Method Summary
`void` | `add(ActionCommandExecutor delegate)` Adds the specified delegate to the container.
`void` | `add(ActionCommandExecutor delegate, ActionCommandExecutor... otherDelegates)` Adds the specified delegate list to the container.
`void` | `addAll(java.util.Collection<? extends ActionCommandExecutor> delegates)` Adds all the specified delegates to the container.
`void` | `clear()` Clears the container of all delegates.
`ActionCommandExecutor` | `getActionCommandExecutor(java.lang.String commandId)` Gets the delegate with the specified id.
`java.util.Collection<ActionCommandExecutor>` | `getDelegates()` Gets the delegates contained by this container.
`void` | `remove(ActionCommandExecutor delegate)` Removes the specified delegate from the container.
`void` | `remove(ActionCommandExecutor delegate, ActionCommandExecutor... otherDelegates)` Removes the specified delegates from the container.
`void` | `removeAll(java.util.Collection<? extends ActionCommandExecutor> delegates)` Removes all the specified delegates from the container.
`int` | `size()` Gets the number of executors in the container.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DelegateProviderSupport

    DelegateProviderSupport()

Method Detail

### addAll

    public void addAll(java.util.Collection<? extends ActionCommandExecutor> delegates)

  Adds all the specified delegates to the container.

  Parameters:
    `delegates` - the delegates to add.

### add

    public void add(ActionCommandExecutor delegate)

  Adds the specified delegate to the container.

  Parameters:
    `delegate` - the delegate to add.

### add

    public void add(ActionCommandExecutor delegate,
                    ActionCommandExecutor... otherDelegates)

  Adds the specified delegate list to the container.

  Parameters:
    `delegate` - the first delegate to add.
    `otherDelegates` - the remaining delegates to add.

### remove

    public void remove(ActionCommandExecutor delegate)

  Removes the specified delegate from the container.

  Parameters:
    `delegate` - the delegate to remove.

### removeAll

    public void removeAll(java.util.Collection<? extends ActionCommandExecutor> delegates)

  Removes all the specified delegates from the container.

  Parameters:
    `delegates` - the delegates to remove.

### remove

    public void remove(ActionCommandExecutor delegate,
                       ActionCommandExecutor... otherDelegates)

  Removes the specified delegates from the container.

  Parameters:
    `delegate` - the first delegate to remove.
    `otherDelegates` - the remaining delegates to remove.

### clear

    public void clear()

  Clears the container of all delegates.

### size

    public int size()

  Gets the number of executors in the container.

  Returns:
    the number of executors in the container.

### getDelegates

    public java.util.Collection<ActionCommandExecutor> getDelegates()

  Gets the delegates contained by this container.

  Returns:
    the delegates contained by this container.

### getActionCommandExecutor

    public ActionCommandExecutor getActionCommandExecutor(java.lang.String commandId)

  Description copied from interface: `DelegateProvider`
  Gets the delegate with the specified id.

  Specified by:
    `getActionCommandExecutor` in interface `DelegateProvider`
  Parameters:
    `commandId` - the commands id.
  Returns:
    the command with the specified id, or `null` if it hasn't been registered with this container of one of its parents.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch