|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectorg.boxed_economy.components.cell.CellSpace
Spaceを継承して、セル空間を定義します。縦横有限個のセルから構成され たSpaceを定義します。このセル空間にはエージェントを配置することができます。 このクラスではセルとエージェントの対応を保持し、取得可能にすることで、 エージェントの配置を定義しています。一つのセルに複数のエージェントを配置する ことが可能です。
| フィールドの概要 |
| インタフェース org.boxed_economy.besp.model.fmfw.Space から継承したフィールド |
serialVersionUID |
| コンストラクタの概要 | |
CellSpace(int xCellNum,
int yCellNum,
boolean isRound)
コンストラクタです。 |
|
| メソッドの概要 | |
void |
addAgent(Agent agent,
int x,
int y)
x,yの座標のCellにエージェントを追加します。 |
int |
getAgentCount()
この空間に存在するエージェント数を返します。 |
java.util.Collection |
getAgents(Agent centerAgent,
CellScope scope)
エージェントとスコープから該当するエージェントを取得します。 |
java.util.Collection |
getAgents(Cell cell)
セルにいるエージェントを検索します。 |
java.util.Collection |
getAgents(int x,
int y)
セルにいるエージェントを検索します。 |
Cell |
getCell(Agent agent)
エージェントのいるCellを検索します。 |
Cell |
getCell(int x,
int y)
引数の座標のCellを返します。 |
java.util.Collection |
getCells(Agent centerAgent,
CellScope scope)
エージェントとスコープから該当するセルを取得します。 |
int |
getXCellNum()
この空間の横の広さを返します。 |
int |
getYCellNum()
この空間の縦の広さを返します。 |
void |
moveAgent(Agent agent,
Cell newCell)
エージェントを移動させるためのメソッドです。 |
void |
removeAgent(Agent agent)
このSpaceからAgentを削除します。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public CellSpace(int xCellNum,
int yCellNum,
boolean isRound)
xCellNum - yCellNum - isRound - | メソッドの詳細 |
public void moveAgent(Agent agent,
Cell newCell)
agent - 移動するエージェントnewCell - 移動先のCell
public void addAgent(Agent agent,
int x,
int y)
agent - x - y - public void removeAgent(Agent agent)
agent - public Cell getCell(Agent agent)
agent -
public java.util.Collection getAgents(Cell cell)
cell -
public java.util.Collection getAgents(int x,
int y)
x - y -
public java.util.Collection getCells(Agent centerAgent,
CellScope scope)
centerAgent - スコープの中心のエージェントscope - そのエージェントのスコープ
public java.util.Collection getAgents(Agent centerAgent,
CellScope scope)
centerAgent - スコープの中心のエージェントscope - そのエージェントのスコープ
public Cell getCell(int x,
int y)
x - y -
public int getAgentCount()
public int getXCellNum()
public int getYCellNum()
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||