org.boxed_economy.besp.model.fmfw
クラス AgentManager

java.lang.Object
  拡張org.boxed_economy.besp.model.fmfw.AgentManager
すべての実装インタフェース:
java.io.Serializable

public class AgentManager
extends java.lang.Object
implements java.io.Serializable

Agentを管理するためのクラスです。 AgentTypeによってAgentを検索・削除するインターフェースを持ちます。 同じAgentTypeでも異なるインスタンスのAgentを区別して格納します。

バージョン:
$Id: AgentManager.java,v 1.1 2004/03/21 12:07:47 macchan Exp $
作成者:
Mizutori
関連項目:
直列化された形式

コンストラクタの概要
protected AgentManager()
           
 
メソッドの概要
 void addAgent(Agent newAgent)
          Agentを追加します。
 Agent getAgent(AgentType type)
          引数のTypeのAgentを返します。
 java.util.Collection getAgents(AgentType type)
          引数のTypeのAgentのリストを返します。
 java.util.List getAgentsRecursively(AgentType type)
          引数のType及びその子TypeのAgentのリストを返します。
 java.util.List getAllAgents()
          全てのAgentの集合を返します。
 void removeAgent(Agent target)
          引数に指定したAgentをリストから削除します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AgentManager

protected AgentManager()
メソッドの詳細

addAgent

public void addAgent(Agent newAgent)
Agentを追加します。

パラメータ:
newAgent - 追加するAgent

removeAgent

public void removeAgent(Agent target)
引数に指定したAgentをリストから削除します。

パラメータ:
target - 削除するAgent

getAgent

public Agent getAgent(AgentType type)
引数のTypeのAgentを返します。複数ある場合、最初のAgentを返します。 もしなければ、Exceptionを返します。

パラメータ:
type - 指定するAgentType
戻り値:
Agent 該当するAgent

getAgents

public java.util.Collection getAgents(AgentType type)
引数のTypeのAgentのリストを返します。 もしなければ、空のリストを返します。

パラメータ:
type - 指定するAgentType
戻り値:
Collection 該当するAgentの集合

getAgentsRecursively

public java.util.List getAgentsRecursively(AgentType type)
引数のType及びその子TypeのAgentのリストを返します。 もしなければ、空のリストを返します。

パラメータ:
type - 指定するAgentType
戻り値:
List 該当するAgentの集合

getAllAgents

public java.util.List getAllAgents()
全てのAgentの集合を返します。

戻り値:
List Agentの集合