|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The model part of the model-view-controller implementation. This interface is a generic implementation that lets the user get and set properties, and register listeners for when the properties change. This interface is intended to primarily be used by clients but it can also be implemented.
Field Summary | |
static Object |
NULL
The property that represents a null value. |
Method Summary | |
void |
addDataModelListener(IDataModelListener theListener)
Adds a model listener that is notified when the model changes. |
boolean |
containsProperty(String theName)
Checks if the model contains a property with the specified name |
Object |
getProperty(String theName)
Retrieves a property with the specified name, or null if
it doesn't exist |
Boolean |
getPropertyAsBoolean(String theName)
Retrieves a property with the specified name as a Boolean ,
or null if it doesn't exist. |
Integer |
getPropertyAsInteger(String theName)
Retrieves a property with the specified name as a Boolean ,
or null if it doesn't exist. |
String |
getPropertyAsString(String theName)
Retrieves a property with the specified name as a String ,
or null if it doesn't exist |
void |
removeDataModelListener(IDataModelListener theListener)
Removes a model listener. |
void |
removeProperty(String theName)
Removes the property with the specified name (and its corresponding value) from this list of properties. |
void |
setProperty(String theName,
boolean theValue)
Set a property with the specified name to the specified boolean value |
void |
setProperty(String theName,
int theValue)
Set a property with the specified name to the specified int
value |
void |
setProperty(String theName,
Object theValue)
Set a property with the specified name to the specified value |
Field Detail |
public static final Object NULL
Method Detail |
public void addDataModelListener(IDataModelListener theListener) throws NullPointerException
theListener
- the listener to register
NullPointerException
- if the theListener
was null
.public void removeDataModelListener(IDataModelListener theListener) throws NullPointerException
theListener
- the listener to un-registered
NullPointerException
- if the theListener
was null
.public boolean containsProperty(String theName) throws NullPointerException
theName
- the name of the property contained in the model
true
if the model contains a property with the
specified name, or false
otherwise
NullPointerException
- if the theName
is null
.public Object getProperty(String theName) throws NullPointerException
null
if
it doesn't exist
theName
- the name of the property to retrieve from the model
null
if
there is no property with the specified name
NullPointerException
- if the theName
is null
.public String getPropertyAsString(String theName) throws NullPointerException
String
,
or null
if it doesn't exist
theName
- the name of the property to retrieve from the model
null
if
there is no property with the specified name
NullPointerException
- if the theName
is null
.public Boolean getPropertyAsBoolean(String theName) throws NullPointerException
Boolean
,
or null
if it doesn't exist. The Boolean
returned represents the value true
if the string argument
is not null
and is equal, ignoring case, to the string
"true"
.
Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.
theName
- the name of the property to retrieve from the model
Boolean
, or
null
if there is no property with the specified
name
NullPointerException
- if the theName
is null
.public Integer getPropertyAsInteger(String theName) throws NullPointerException
Boolean
,
or null if it doesn't exist. The value is interpreted as representing a
signed decimal integer, exactly as if the argument were given to the
java.lang.Boolean#parseInt(java.lang.String) method. The result is an
Integer
object that represents the integer value specified
by the value.
In other words, this method returns an Integer
object
equal to the value of:
new Integer(Integer.parseInt(s))
theName
- the name of the parameter to retrieve from the model
Integer
, or
null
if there is no property with the specified
name.
NullPointerException
- if the theName
is null
.public void setProperty(String theName, boolean theValue) throws NullPointerException
boolean
value
theName
- the name for the propertytheValue
- the boolean
value for the propery
NullPointerException
- if the theName
or value is null
.public void setProperty(String theName, int theValue) throws NullPointerException
int
value
theName
- the name for the propertytheValue
- the int
value for the propery
NullPointerException
- if the theName
is null
.public void setProperty(String theName, Object theValue) throws NullPointerException
theName
- the name for the propertytheValue
- the value for the propery
NullPointerException
- if the theName
or theValue
is
null
.public void removeProperty(String theName) throws NullPointerException
theName
- the name of the property to remove
NullPointerException
- if the theName
is null
.
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.