All Packages Class Hierarchy This Package Previous Next Index
Class bvyy.database.Capability
java.lang.Object
|
+----bvyy.database.Capability
- public class Capability
- extends Object
- implements Serializable
Make a general purpose capability model.
Intent
This is a capability class. It records the capabilities that a thing may
have. These capabilities are organised into multiple trees as required by
the game world builder.
Motivation
Allow the game desingers to specify capabilities that I could not
have envisionaged. Maked the game customisable by a non-computer literate
author with no need to write code.
- Version:
- 0.0.2 26 October 1998
- Author:
- (c) 1998 Brian Voon Yee Yap
-
Capability(String)
- Creates a new root Capability.
-
Capability(String, Capability)
- Creates a new Capability.
-
addCapability(String)
- Adds a new capability as a branch.
-
addGeneralEventListener(GeneralEventListener)
-
-
elements()
- Returns an enumeration of the components of this vector.
-
fireReceiveEvent(GeneralEvent)
-
-
getCommand()
-
-
getName()
- returns the Name for this capability.
-
getNounForm()
-
-
getParent()
-
-
getRoot()
- Test if this capability is the root.
-
removeCapability(String)
- removes a capability from the branches.
-
removeGeneralEventListener(GeneralEventListener)
-
-
setCommand(Command)
-
-
setName(String)
- Sets the name for this capability.
-
setNounForm(String)
-
-
setParent(Capability)
-
-
setRoot(boolean)
- Sets this node to be a root node.
If the parent has been set, then the paret is reset to null.
Capability
public Capability(String newName)
- Creates a new root Capability.
- Parameters:
- newName - The name for this capability.
Capability
public Capability(String newName,
Capability myParentCapability)
- Creates a new Capability.
- Parameters:
- newName - The name for this capability.
- myParentCapability - The name of the parent capability.
getRoot
public boolean getRoot()
- Test if this capability is the root.
- Returns:
- true if this capability is at the root.
setRoot
public void setRoot(boolean newRoot)
- Sets this node to be a root node.
If the parent has been set, then the paret is reset to null.
elements
public synchronized Enumeration elements()
- Returns an enumeration of the components of this vector.
- Returns:
- an enumeration of the components of this vector.
setName
public synchronized void setName(String newName)
- Sets the name for this capability.
getName
public synchronized String getName()
- returns the Name for this capability.
- Returns:
- the name of this capability.
addCapability
public synchronized void addCapability(String newCapability)
- Adds a new capability as a branch.
- Parameters:
- newCapability - the new capability to be added to the node.
removeCapability
public synchronized boolean removeCapability(String oldCapability)
- removes a capability from the branches.
- Parameters:
- oldCapability - the capability to be removed.
- Returns:
- false if the object spcified did not exist. true if it did.
removeGeneralEventListener
public synchronized void removeGeneralEventListener(GeneralEventListener l)
addGeneralEventListener
public synchronized void addGeneralEventListener(GeneralEventListener l)
fireReceiveEvent
protected void fireReceiveEvent(GeneralEvent e)
setParent
public void setParent(Capability newParent)
getParent
public Capability getParent()
setCommand
public void setCommand(Command newCommand)
getCommand
public Command getCommand() throws NoCommandAssignedException
setNounForm
public void setNounForm(String newNounForm)
getNounForm
public String getNounForm()
All Packages Class Hierarchy This Package Previous Next Index
|