org.boxed_economy.besp.model
クラス ModelContainer

java.lang.Object
  拡張org.boxed_economy.besp.model.ModelContainer

public class ModelContainer
extends java.lang.Object

モデルコンテナーです。 モデルを設定・更新するメソッドを持ちます。また、モデルスレッドを保持します。

バージョン:
$Id: ModelContainer.java,v 1.1 2004/03/21 12:07:49 macchan Exp $
作成者:
rx78g

フィールドの概要
static int PRIORITY_DEFAULT
          定数
 
コンストラクタの概要
ModelContainer(BESPContainer container)
          Constructor for ModelContainer.
 
メソッドの概要
 void addModelContainerListener(ModelContainerListener l)
           
protected  void firePrepareWorldClose(ModelContainerEvent e)
           
protected  void firePrepareWorldOpen(ModelContainerEvent e)
           
protected  void fireWorldClosed(ModelContainerEvent e)
           
protected  void fireWorldOpened(ModelContainerEvent e)
           
 AgentType getAgentType(java.lang.String key)
          キーに該当するAgentTypeを取得します。
 java.util.Collection getAgentTypes()
          全てのAgentTypeを返します。
 BehaviorType getBehaviorType(java.lang.String key)
          キーに該当するBehaviorTypeを取得します。
 java.util.Collection getBehaviorTypes()
          全てのBehaviorTypeを返します。
 BESPContainer getContainer()
          container関連
 java.io.File getFile()
          File関連
 GoodsType getGoodsType(java.lang.String key)
          キーに該当するGoodsTypeを取得します。
 java.util.Collection getGoodsTypes()
          全てのGoodsTypeを返します。
 InformationType getInformationType(java.lang.String key)
          キーに該当するInformationTypeを取得します。
 java.util.Collection getInformationTypes()
          全てのInformationTypeを返します。
 LimitedTimeRunSetting getLimitedTimeRunSetting()
          このthreadに現在設定されている実行設定を返します。
 World getModel()
          世界関連
 ModelThread getModelThread()
          thread関連
 java.util.List getOrderdPriorities()
          降順に整列されたプライオリティーのリストを返します
 PresentationContainer getPresentationContainer()
           
 int getPriority(AgentType agentType)
          引数のAgentTypeに対応するPriorityを返します。
 RelationType getRelationType(java.lang.String key)
          キーに該当するRelationTypeを取得します。
 java.util.Collection getRelationTypes()
          全てのRelationTypeを返します。
 void initialize()
          初期化を行ないます。
 AgentType installAgentType(java.lang.String name)
          AgentTypeを生成して返します。
 AgentType installAgentType(java.lang.String name, int priority)
          AgentTypeを生成して返します。
 BehaviorType installBehaviorType(java.lang.String name)
          BehaviorTypeを生成して返します。
 GoodsType installGoodsType(java.lang.String name)
          GoodsTypeを生成して返します。
 InformationType installInformationType(java.lang.String name)
          InformationTypeを生成して返します。
 RelationType installRelationType(java.lang.String name)
          RelationTypeを生成して返します。
 void removeModelContainerListener(ModelContainerListener l)
           
 void setFile(java.io.File file)
          modelの出力を、boxFileを指定して行ないます。
 void setLimitedRunSetting(LimitedTimeRunSetting setting)
          このClockに実行設定を設定します。
 void setModel(World model)
           
 void setPriority(AgentType agentType, int priority)
          Priorityを追加設定します。
 void terminate()
          終了処理を行ないます。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

PRIORITY_DEFAULT

public static final int PRIORITY_DEFAULT
定数

関連項目:
定数フィールド値
コンストラクタの詳細

ModelContainer

public ModelContainer(BESPContainer container)
Constructor for ModelContainer.

メソッドの詳細

initialize

public void initialize()
初期化を行ないます。


terminate

public void terminate()
終了処理を行ないます。


getContainer

public BESPContainer getContainer()
container関連


getPresentationContainer

public PresentationContainer getPresentationContainer()

getModel

public World getModel()
世界関連


setModel

public void setModel(World model)

getFile

public java.io.File getFile()
File関連


setFile

public void setFile(java.io.File file)
modelの出力を、boxFileを指定して行ないます。 引数として指定したboxFileに出力されます。 以降は引数のboxFileがboxFileとして指定されます。


getModelThread

public ModelThread getModelThread()
thread関連


getLimitedTimeRunSetting

public LimitedTimeRunSetting getLimitedTimeRunSetting()
このthreadに現在設定されている実行設定を返します。

戻り値:
LimitedTimeRunSetting

setLimitedRunSetting

public void setLimitedRunSetting(LimitedTimeRunSetting setting)
このClockに実行設定を設定します。


getAgentType

public AgentType getAgentType(java.lang.String key)
キーに該当するAgentTypeを取得します。 存在しなければ、nullを返します。

パラメータ:
key - 検索するキー文字列

getBehaviorType

public BehaviorType getBehaviorType(java.lang.String key)
キーに該当するBehaviorTypeを取得します。 存在しなければ、nullを返します。

パラメータ:
key - 検索するキー文字列

getGoodsType

public GoodsType getGoodsType(java.lang.String key)
キーに該当するGoodsTypeを取得します。 存在しなければ、nullを返します。

パラメータ:
key - 検索するキー文字列

getInformationType

public InformationType getInformationType(java.lang.String key)
キーに該当するInformationTypeを取得します。 存在しなければ、nullを返します。

パラメータ:
key - 検索するキー文字列

getRelationType

public RelationType getRelationType(java.lang.String key)
キーに該当するRelationTypeを取得します。 存在しなければ、nullを返します。

パラメータ:
key - 検索するキー文字列

getAgentTypes

public java.util.Collection getAgentTypes()
全てのAgentTypeを返します。


getBehaviorTypes

public java.util.Collection getBehaviorTypes()
全てのBehaviorTypeを返します。


getGoodsTypes

public java.util.Collection getGoodsTypes()
全てのGoodsTypeを返します。


getInformationTypes

public java.util.Collection getInformationTypes()
全てのInformationTypeを返します。


getRelationTypes

public java.util.Collection getRelationTypes()
全てのRelationTypeを返します。


installAgentType

public AgentType installAgentType(java.lang.String name)
AgentTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
AgentType 生成されたType

installAgentType

public AgentType installAgentType(java.lang.String name,
                                  int priority)
AgentTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
AgentType 生成されたType

installGoodsType

public GoodsType installGoodsType(java.lang.String name)
GoodsTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
GoodsType 生成されたType

installBehaviorType

public BehaviorType installBehaviorType(java.lang.String name)
BehaviorTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
BehaviorType 生成されたType

installRelationType

public RelationType installRelationType(java.lang.String name)
RelationTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
RelationType 生成されたType

installInformationType

public InformationType installInformationType(java.lang.String name)
InformationTypeを生成して返します。Typeの生成は必ずこのメソッドを用いて行って下さい。

パラメータ:
name - 生成するTypeの名前
戻り値:
InformationType 生成されたType

getPriority

public int getPriority(AgentType agentType)
引数のAgentTypeに対応するPriorityを返します。 もし、存在しなければnullを返します。

パラメータ:
agentType - 取得したいPriorityのType
戻り値:
Priority 該当するPriority

setPriority

public void setPriority(AgentType agentType,
                        int priority)
Priorityを追加設定します。

パラメータ:
agentType - 関連付けるType

getOrderdPriorities

public java.util.List getOrderdPriorities()
降順に整列されたプライオリティーのリストを返します


addModelContainerListener

public void addModelContainerListener(ModelContainerListener l)

removeModelContainerListener

public void removeModelContainerListener(ModelContainerListener l)

firePrepareWorldOpen

protected void firePrepareWorldOpen(ModelContainerEvent e)

fireWorldOpened

protected void fireWorldOpened(ModelContainerEvent e)

firePrepareWorldClose

protected void firePrepareWorldClose(ModelContainerEvent e)

fireWorldClosed

protected void fireWorldClosed(ModelContainerEvent e)