Class ActionStore


  • public class ActionStore
    extends java.lang.Object
    Class used to implement an ordered collection of IAction
    Author:
    Alessandro Buldini, Alessandro Pomponio, Federico Zanini
    See Also:
    Aima Java
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionStore​(int capacity)
      Creates a list of actions and their respective heuristic values
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(IAction action, int utilValue)
      Inserts in an ordered way an action and its heuristic value in the action store.
      java.util.List<IAction> getActions()
      Returns the list containing the actions stored
      int size()
      Returns the size of action list
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionStore

        public ActionStore​(int capacity)
        Creates a list of actions and their respective heuristic values
        Parameters:
        capacity - capacity of both actions and utilValues lists
    • Method Detail

      • add

        public void add​(IAction action,
                        int utilValue)
        Inserts in an ordered way an action and its heuristic value in the action store.
        Parameters:
        action - action to be stored within the class
        utilValue - action's associated value
      • size

        public int size()
        Returns the size of action list
        Returns:
        the size of action list
      • getActions

        public java.util.List<IAction> getActions()
        Returns the list containing the actions stored
        Returns:
        the list containing the actions stored