net.officefloor.demo.macrolist
Class MacroList

java.lang.Object
  extended by net.officefloor.demo.macrolist.MacroList
All Implemented Interfaces:
RecordListener

public class MacroList
extends Object
implements RecordListener


Constructor Summary
MacroList(MacroIndexFactory indexFactory, MacroListListener listener)
          Initiate.
 
Method Summary
 void addMacro(Macro macro)
          Adds a Macro.
 MacroItem getItem(int index)
          Obtains the MacroItem at the index within this list.
 void removeItem(int index)
          Removes the MacroItem at the index from the list.
 int size()
          Obtains the number of MacroItem instances within this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroList

public MacroList(MacroIndexFactory indexFactory,
                 MacroListListener listener)
Initiate.

Parameters:
indexFactory - MacroIndexFactory.
listener - MacroListListener.
Method Detail

size

public int size()
Obtains the number of MacroItem instances within this list.

Returns:
Number of MacroItem instances within this list.

getItem

public MacroItem getItem(int index)
                  throws IndexOutOfBoundsException
Obtains the MacroItem at the index within this list.

Parameters:
index - Index of the MacroItem to obtain.
Returns:
MacroItem at the index.
Throws:
IndexOutOfBoundsException - If index does not correspond with a MacroItem.

removeItem

public void removeItem(int index)
                throws IndexOutOfBoundsException
Removes the MacroItem at the index from the list.

Parameters:
index - Index of the MacroItem to remove.
Throws:
IndexOutOfBoundsException - If index does not correspond with a MacroItem.

addMacro

public void addMacro(Macro macro)
Description copied from interface: RecordListener
Adds a Macro.

Specified by:
addMacro in interface RecordListener
Parameters:
macro - Macro.


Copyright © 2005-2011. All Rights Reserved.