|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.primordion.xholon.base.Xholon
org.primordion.xholon.base.TreeNodeFactoryDynamic
TreeNodeFactoryDynamic manages concrete instances of TreeNode subclasses. Entities are dynamically created as needed. This class is designed to be compatible with TreeNodeFactoryStatic.
TODO Keep track of how many instances of each type are instantiated, in order to be able to create applications where conservation is important.
TODO Another implementation of this class could keep all instantiated instances in a hash structure, allowing reuse of entities.
| Field Summary |
| Fields inherited from class org.primordion.xholon.base.Xholon |
DEFAULT_LEVEL, interaction, interactionsEnabled |
| Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
| Constructor Summary | |
TreeNodeFactoryDynamic(java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass,
java.lang.Class activitySubclass)
Constructor. |
|
| Method Summary | |
Activity |
getActivityNode()
Get a Activity node from the factory. |
AbstractGrid |
getGridEntityNode()
Get a GridEntity node from the factory. |
IXholon |
getNode(java.lang.Class xholonSubclass)
Get a node instance of the specified Java class. |
IXholon |
getNode(int xhType)
Get a node instance of the specified Xholon Type. |
int |
getNumAvailNodes(int resourceType)
This is here for compatibility with TreeNodeFactoryStatic. |
StateMachineEntity |
getStateMachineEntityNode()
Get a StateMaqchineEntity node from the factory. |
IXholonClass |
getXholonClassNode()
Get a XholonClass instance from the factory. |
IXholon |
getXholonNode()
Get a Xholon instance from the factory. |
IXholon |
getXholonNode(java.lang.String implName)
Get a Xholon instance from the factory, based on its full package name. |
void |
returnTreeNode(IXholon node)
Return a TreeNode to the factory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TreeNodeFactoryDynamic(java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass,
java.lang.Class activitySubclass)
xholonSubclass - Which subclass of Xholon should be instantiated.xholonClassSubclass - Which subclass of XholonClass should be instantiated.activitySubclass - Which subclass of Activity should be instantiated.| Method Detail |
public int getNumAvailNodes(int resourceType)
getNumAvailNodes in interface ITreeNodeFactoryresourceType - The type of node:
Xholon, XholonClass, StateMachineEntity, or Activity.
ITreeNodeFactory.getNumAvailNodes(int)public IXholon getNode(java.lang.Class xholonSubclass)
ITreeNodeFactory
getNode in interface ITreeNodeFactoryxholonSubclass -
public IXholon getNode(int xhType)
ITreeNodeFactory
getNode in interface ITreeNodeFactoryxhType -
public IXholon getXholonNode()
ITreeNodeFactory
getXholonNode in interface ITreeNodeFactorypublic IXholon getXholonNode(java.lang.String implName)
ITreeNodeFactory
getXholonNode in interface ITreeNodeFactoryimplName - The name of a Java class.
public IXholonClass getXholonClassNode()
ITreeNodeFactory
getXholonClassNode in interface ITreeNodeFactorypublic Activity getActivityNode()
ITreeNodeFactory
getActivityNode in interface ITreeNodeFactorypublic StateMachineEntity getStateMachineEntityNode()
ITreeNodeFactory
getStateMachineEntityNode in interface ITreeNodeFactorypublic AbstractGrid getGridEntityNode()
ITreeNodeFactory
getGridEntityNode in interface ITreeNodeFactorypublic void returnTreeNode(IXholon node)
ITreeNodeFactory
returnTreeNode in interface ITreeNodeFactorynode - The TreeNode being returned.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||