mil.navy.nps.relate
Interface Role

All Known Implementing Classes:
RoleSquadLeader, RoleSquadMember

public interface Role

This interface implements the RELATE Role.

A Role object brings additional capabilities and responsibilities to a host Agent. This can include, but is not limited to, sensors, goals (with their associated Rules), and methods to act upon itself and its environment.

Since:
JDK1.3
Version:
1.0, 17 Aug 00
Author:
Michael R. Dickson, Kimberly A. Roddy

Method Summary
 void addAction(Action pAction)
          Adds the indicated action to the actionList
 void addNewGoal(Goal pGoal)
          Adds the passed in Goal to the goalList.
 void addSensor(Sensor pSensor)
          Adds the indicated sensor to the sensorList
 java.util.Vector getActionListVec()
          Getter for actionList.
 java.util.Vector getGoalListVec()
          Getter for goalList
 java.lang.String getRoleName()
          Gets the role name
 java.util.Vector getSensorListVec()
          Getter for sensorList
 boolean removeAction(Action pAction)
          Removes the indicated action from the actionList
 boolean removeGoal(Goal pGoal)
          Removes the Goal from the goalList.
 boolean removeSensor(Sensor pSensor)
          Removes the indicated sensor from the sensorList
 void setActionList(java.util.Vector pActionList)
          Setter for actionList.
 void setRoleName(java.lang.String pRoleName)
          Sets the role name of the role object, this should be the exact class name of the role.
 void setSensorList(java.util.Vector pSensorList)
          Setter for sensorList
 

Method Detail

addNewGoal

public void addNewGoal(Goal pGoal)
Adds the passed in Goal to the goalList.

Parameters:
pGoal -

removeGoal

public boolean removeGoal(Goal pGoal)
Removes the Goal from the goalList.

Parameters:
pGoal -
Returns:
The success of the removal operation:
  • true - The Goal was successfully removed
  • false - The Goal did not exist in the Role's goalList

  • getGoalListVec

    public java.util.Vector getGoalListVec()
    Getter for goalList

    Returns:
    goalList vector

    getSensorListVec

    public java.util.Vector getSensorListVec()
    Getter for sensorList

    Returns:
    sensorList vector

    setSensorList

    public void setSensorList(java.util.Vector pSensorList)
    Setter for sensorList

    Parameters:
    pSensorList -

    removeSensor

    public boolean removeSensor(Sensor pSensor)
    Removes the indicated sensor from the sensorList

    Parameters:
    pSensor - An integer representing the sensor to be removed
    Returns:
    The success of the removal operation:
  • true - The sensor was successfully removed
  • false - The sensor did not exist in the Role's sensorList

  • addSensor

    public void addSensor(Sensor pSensor)
    Adds the indicated sensor to the sensorList

    Parameters:
    pSensor - An integer representing the sensor to be added

    getActionListVec

    public java.util.Vector getActionListVec()
    Getter for actionList. Returns a Vector containing a list of integers representing all of the actions available to the agent due to this Role

    Returns:
    actionList

    setActionList

    public void setActionList(java.util.Vector pActionList)
    Setter for actionList. Replaces the actionList Vector with a new list of integers representing all of the actions available to the agent due to this Role

    Parameters:
    pActionList -

    removeAction

    public boolean removeAction(Action pAction)
    Removes the indicated action from the actionList

    Parameters:
    pAction - The action to be removed
    Returns:
    The success of the removal operation:
  • true - The action was successfully removed
  • false - The action did not exist in the Role's actionList

  • addAction

    public void addAction(Action pAction)
    Adds the indicated action to the actionList

    Parameters:
    pAction - The action to be added

    setRoleName

    public void setRoleName(java.lang.String pRoleName)
    Sets the role name of the role object, this should be the exact class name of the role.

    Parameters:
    pRoleName - The role name

    getRoleName

    public java.lang.String getRoleName()
    Gets the role name

    Returns:
    The "string" role name.