org.simBio.core
Class Component

java.lang.Object
  extended by org.simBio.core.Component
All Implemented Interfaces:
Node
Direct Known Subclasses:
Link, Parameter

public class Component
extends java.lang.Object
implements Node

super class of the core package, similar to public String, Component of the Composite Pattern.
名前付きの文字列を表す

Version:
$Id: Component.java,v 1.4 2007/09/10 05:45:00 nsarai Exp $
Author:
Nobuaki Sarai

Constructor Summary
Component()
           
 
Method Summary
 void accept(Visitor visitor)
          use visitor pattern
visitorを受け容れ、訪問する。
 void addDydt(double dydt)
          always throws UnsupportedOperationException, need to implement 'Node'
 void addValue(double value)
          always throws UnsupportedOperationException, need to implement 'Node'
protected  void end()
          called at the end of integration,
計算終了時に呼ばれます。
 java.lang.String getIndent()
          make hierarchical indent using level
階層を元に字下げを作る。
 java.lang.String getIndentedShortName()
          return indented short name
字下げをした名前を返す。
 java.lang.String getName()
          complete name from root.
 java.lang.String getName(int prefix)
          complete name from prefix level.
 Composite getParent()
          自分が属するCompositeへの参照を返す。
 Composite getRoot()
          自分が属するinstance treeのrootへの参照を返す。
 java.lang.String getShortName()
          short name
短い名前を返す。
 java.lang.String getUnits()
          Returns the units.
 double getValue()
          always throws UnsupportedOperationException, need to implement 'Node'
 java.lang.String getValueString()
          文字列として現在値を返す。
 boolean isNamed(java.lang.String s)
          compare s with name
引数の文字列が、自分の名前と一致すればtrueを返す。
 boolean isPrefixed(java.lang.String prefix)
          check name whether start with s or not
引数の文字列が、自分の名前の先頭と一致すればtrueを返す。
 void logIndented(java.lang.String s)
          Deprecated. Use getIndentedShortName() and org.apache.commons.logging.Log instead
protected  void prepare()
          prepare for integration.
protected  void quit()
          called before destruction,
instanceを破棄する前に呼び出されます。
 void setInitializer(Initializer initializer)
          set parent, root, level, name and valueString and attend to the parent's Children.
protected  void setLinks()
          called after instance tree was constructed, getNode, getLink here,
インスタンスツリー作成後に呼び出される,
 void setValue(double newValue)
          always throws UnsupportedOperationException, need to implement 'Node'
 void setValueString(java.lang.String label)
          文字列を受け取り現在値に設定する。 updateObserverに通知する。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Component

public Component()
Method Detail

setInitializer

public void setInitializer(Initializer initializer)
set parent, root, level, name and valueString and attend to the parent's Children.
親とConductorへの参照, 自分の階層、名前、初期値、単位を設定し、親の子供に登録する

Parameters:
initializer -

setLinks

protected void setLinks()
called after instance tree was constructed, getNode, getLink here,
インスタンスツリー作成後に呼び出される,


prepare

protected void prepare()
prepare for integration. This is called at the beginning of integration.
計算開始時に呼び出される。


end

protected void end()
called at the end of integration,
計算終了時に呼ばれます。


quit

protected void quit()
called before destruction,
instanceを破棄する前に呼び出されます。


accept

public void accept(Visitor visitor)
use visitor pattern
visitorを受け容れ、訪問する。

Parameters:
visitor -

isNamed

public boolean isNamed(java.lang.String s)
compare s with name
引数の文字列が、自分の名前と一致すればtrueを返す。

Parameters:
s - name
Returns:
true, when name equals to s

isPrefixed

public boolean isPrefixed(java.lang.String prefix)
check name whether start with s or not
引数の文字列が、自分の名前の先頭と一致すればtrueを返す。

Parameters:
prefix - prefix of name
Returns:
true, if instance name starts with s

getValueString

public java.lang.String getValueString()
文字列として現在値を返す。

Returns:
value as String

setValueString

public void setValueString(java.lang.String label)
文字列を受け取り現在値に設定する。 updateObserverに通知する。

Parameters:
label - value as String

setValue

public void setValue(double newValue)
always throws UnsupportedOperationException, need to implement 'Node'

Specified by:
setValue in interface Node
Parameters:
newValue -
Throws:
java.lang.UnsupportedOperationException - always

addValue

public void addValue(double value)
always throws UnsupportedOperationException, need to implement 'Node'

Specified by:
addValue in interface Node
Parameters:
value -
Throws:
java.lang.UnsupportedOperationException - always

getValue

public double getValue()
always throws UnsupportedOperationException, need to implement 'Node'

Specified by:
getValue in interface Node
Returns:
value
Throws:
java.lang.UnsupportedOperationException - always

addDydt

public void addDydt(double dydt)
always throws UnsupportedOperationException, need to implement 'Node'

Specified by:
addDydt in interface Node
Parameters:
dydt -
Throws:
java.lang.UnsupportedOperationException - always

getName

public java.lang.String getName()
complete name from root.
完全な名前を返す。

Returns:
hierarchical name

getName

public java.lang.String getName(int prefix)
complete name from prefix level.
prefixで指定した親を基準とした名前を返す。

Parameters:
prefix - prefix level
Returns:
hierarchical name

getShortName

public java.lang.String getShortName()
short name
短い名前を返す。

Returns:
short name

getParent

public Composite getParent()
自分が属するCompositeへの参照を返す。

Returns:
parent

getRoot

public Composite getRoot()
自分が属するinstance treeのrootへの参照を返す。

Returns:
root

getUnits

public java.lang.String getUnits()
Returns the units.

Returns:
String

getIndent

public java.lang.String getIndent()
make hierarchical indent using level
階層を元に字下げを作る。

Returns:
indent space

getIndentedShortName

public java.lang.String getIndentedShortName()
return indented short name
字下げをした名前を返す。

Returns:
indented short name

logIndented

public void logIndented(java.lang.String s)
Deprecated. Use getIndentedShortName() and org.apache.commons.logging.Log instead

log indented name & additional text
字下げをして名前を記録する。 You should use org.apache.commons.logging.Log instead. private static Log log = LogFactory.getLog(YourClass.class);

Parameters:
s - additional text


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.