|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--universe.server.KeyedItem
Field Summary | |
private java.lang.String |
myBackStory
|
private java.lang.String |
myDescription
|
private java.lang.String |
myKey
|
private static java.util.Hashtable |
ourKeySpaceTable
|
Constructor Summary | |
KeyedItem()
no-args constructor as needed for subclasses which implement Serializable |
|
KeyedItem(java.lang.String aKey,
java.lang.String keySpaceName)
This is the designated constructor for objects of this class. |
Method Summary | |
static java.lang.Object |
FindByDescriptionAndSpace(java.lang.String aDescription,
java.lang.String keySpaceName)
This class method returns an instance in the given keyspace whose description matches the one given. |
static java.lang.Object |
FindByKeyAndSpace(java.lang.String aKey,
java.lang.String keySpaceName)
This class method returns the instance which is stored under the given key in the key space with the given name, or null if no such object exists. |
java.lang.String |
getBackStory()
This method returns the localized back story associated with the receiving instance. |
java.lang.String |
getDescription()
This method returns the localized description associated with the receiving instance. |
java.lang.String |
getKey()
This method returns the key word associated with the receiving instance. |
int |
hashCode()
This method returns a hash code value which can be used by Hashtable objects. |
void |
performLocalization()
Since we don't wnat these objects to bother initializing their localized string attributes until (and if) neccessary, this method takes care of doing that when it is required. |
void |
setBackStory(java.lang.String newValue)
This method sets the localized back story associated with the receiving instance. |
void |
setDescription(java.lang.String newValue)
This method sets the localized description associated with the receiving instance. |
java.lang.String |
toString()
This method simply returns the description of of the receiving instance suitable for display in the user interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static java.util.Hashtable ourKeySpaceTable
private java.lang.String myKey
private java.lang.String myDescription
private java.lang.String myBackStory
Constructor Detail |
public KeyedItem()
public KeyedItem(java.lang.String aKey, java.lang.String keySpaceName)
aKey
- The invariant keyword unique in the new instance's key spacekeySpaceName
- The name of the key space where the key is unique.getKey
,
FindByKeyAndSpace
Method Detail |
public static java.lang.Object FindByKeyAndSpace(java.lang.String aKey, java.lang.String keySpaceName)
aKey
- The key uniquely identifying the desired object in the given key spacepublic static java.lang.Object FindByDescriptionAndSpace(java.lang.String aDescription, java.lang.String keySpaceName)
aDescription
- The description of the desired objectpublic java.lang.String getKey()
public java.lang.String getDescription()
public void setDescription(java.lang.String newValue)
newValue
- The new description string value.performLocalization
,
getDescription
public java.lang.String getBackStory()
public void setBackStory(java.lang.String newValue)
newValue
- The new back story string value.performLocalization.
,
getBackStory
public void performLocalization()
public java.lang.String toString()
toString
in class java.lang.Object
getDescription
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |