Package ca.cgjennings.apps.arkham
Interface NamedObjectDatabase
-
public interface NamedObjectDatabaseThis interface defines the Java-side interface to the named object database that can be obtained fromStrangeEons.getNamedObjects(). The purpose of the database is to allow plug-in scripts to share objects and communicate with each other. This interface provides a way to access these objects from compiled Java code as well.- Since:
- 3.0
- Author:
- Chris Jennings
- See Also:
StrangeEons.getNamedObjects()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetObject(java.lang.String name)Returns the object associated with the requested name, ornullif there is no object associated with the name.voidputObject(java.lang.String name, java.lang.Object object)Associates an object with the specified name.voidremoveObject(java.lang.String name)Removes the object with the requested name, if any.
-
-
-
Method Detail
-
getObject
java.lang.Object getObject(java.lang.String name)
Returns the object associated with the requested name, ornullif there is no object associated with the name.- Parameters:
name- the object name to return- Returns:
- the value of the object in the database, or
null - Throws:
java.lang.NullPointerException- if name isnull
-
putObject
void putObject(java.lang.String name, java.lang.Object object)Associates an object with the specified name. If an object with this name already exists, a warning will be logged to help diagnose naming conflicts.- Parameters:
name- the name of the object to returnobject- the object to associate with the name in the database- Throws:
java.lang.NullPointerException- if the name or object isnulljava.lang.IllegalArgumentException- if the name is already associated with an object
-
removeObject
void removeObject(java.lang.String name)
Removes the object with the requested name, if any.- Parameters:
name- the name of the object to remove- Throws:
java.lang.NullPointerException- if name isnull
-
-