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

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

public final class Goods
extends Entity

Boxed Economy基礎モデルにおいてエージェント間で取引される財を定義します。 例えば品物や貨幣ですが、agentの取引全てを含むものとして声などもgoodsです。 Goodsの属性としては、Type(種類)、Quantity(量),Information(情報)です。 複数の情報をもたせることができるようになりました。 goodsは2重参照を防ぐために特殊な扱いをしていますので、Goodsの扱いには留意してください。 (goodsManagerを参照)goodsは継承することを前提にしていません。 worldのcreateGoods(),consumeGoods()を 使うことによって、生産・消費として明示的にUpdateEventを送ることができます。

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

入れ子クラスの概要
 
クラス org.boxed_economy.besp.model.fmfw.FmFwObject から継承した入れ子クラス
FmFwObject.InstanceCounter
 
コンストラクタの概要
protected Goods(GoodsType type, double quantity)
          通常使われるコンストラクタです。
 
メソッドの概要
protected  void finalize()
           
 Information getAttachment()
          Returns the attachment.
 Information getAttachmentKey()
           
 GoodsQuantity getGoodsQuantity()
          GoodsQuantityを返します
 GoodsType getType()
          GoodsTypeを返します
 boolean hasAttachment()
          Returns if the goods has the attachment information.
 void setAttachment(Information attachment)
          Sets the attachment.
 void setAttachment(InformationType key, Information attachment)
          Sets the attachment.
 java.lang.String toString()
          タイプのオブジェクト名とクラス名を文字列で返します.
 
クラス org.boxed_economy.besp.model.fmfw.Entity から継承したメソッド
getInformation, getInformation, getInformations, getWorld, hasInformation, putInformation, putInformation, removeInformation, setInformations, setWorld
 
クラス org.boxed_economy.besp.model.fmfw.FmFwObject から継承したメソッド
getInstanceCounters
 
クラス java.lang.Object から継承したメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Goods

protected Goods(GoodsType type,
                double quantity)
通常使われるコンストラクタです。

パラメータ:
type - Goodsの種類
quantity - Goodsの量
メソッドの詳細

getType

public GoodsType getType()
GoodsTypeを返します

戻り値:
GoodsType Goodsの種類

getGoodsQuantity

public GoodsQuantity getGoodsQuantity()
GoodsQuantityを返します

戻り値:
GoodsQuantity Goodsの量

getAttachment

public Information getAttachment()
Returns the attachment.

戻り値:
Information

setAttachment

public void setAttachment(Information attachment)
Sets the attachment.

パラメータ:
attachment - The attachment to set

setAttachment

public void setAttachment(InformationType key,
                          Information attachment)
Sets the attachment.

パラメータ:
attachment - The attachment to set

hasAttachment

public boolean hasAttachment()
Returns if the goods has the attachment information.


getAttachmentKey

public Information getAttachmentKey()

toString

public java.lang.String toString()
タイプのオブジェクト名とクラス名を文字列で返します. toStringをオーバーライドします。


finalize

protected void finalize()
                 throws java.lang.Throwable
オーバーライド:
クラス FmFwObject 内の finalize
例外:
java.lang.Throwable
関連項目:
Object.finalize()