edu.iastate.jrelm.demo.bandit
Class BanditActionDomain

java.lang.Object
  extended by edu.iastate.jrelm.demo.bandit.BanditActionDomain
All Implemented Interfaces:
ActionDomain<java.lang.Integer,BanditAction>

public class BanditActionDomain
extends java.lang.Object
implements ActionDomain<java.lang.Integer,BanditAction>


Constructor Summary
BanditActionDomain()
           
 
Method Summary
 boolean containsAction(BanditAction actionToCheck)
          Determines if the given Action is in this domain.
 BanditAction getAction(java.lang.Integer index)
          Retrieves the Action indicated by the id object.
 java.util.ArrayList<java.lang.Integer> getIDList()
          Retrieve a list of the identifiers for all Actions in this domain.
 int size()
          Reports the number of Actions in this domain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BanditActionDomain

public BanditActionDomain()
Method Detail

size

public int size()
Description copied from interface: ActionDomain
Reports the number of Actions in this domain.

Specified by:
size in interface ActionDomain<java.lang.Integer,BanditAction>
Returns:
size of this domain

getAction

public BanditAction getAction(java.lang.Integer index)
Description copied from interface: ActionDomain
Retrieves the Action indicated by the id object. Should return null if the id does not match an existing Action.

Specified by:
getAction in interface ActionDomain<java.lang.Integer,BanditAction>
Parameters:
index - - identifier indicating the desired Action
Returns:
the requested Action associated with id in this domain

getIDList

public java.util.ArrayList<java.lang.Integer> getIDList()
Description copied from interface: ActionDomain
Retrieve a list of the identifiers for all Actions in this domain.

Specified by:
getIDList in interface ActionDomain<java.lang.Integer,BanditAction>
Returns:
list of action IDs.

containsAction

public boolean containsAction(BanditAction actionToCheck)
Description copied from interface: ActionDomain
Determines if the given Action is in this domain.

Specified by:
containsAction in interface ActionDomain<java.lang.Integer,BanditAction>