|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.google.gwt.ajaxloader.client.Properties
public abstract class Properties
A collection of properties of arbitrary type, for interoperability with non-GWT JavaScript libraries.
Nested Class Summary | |
---|---|
static class |
Properties.TypeException
An exception thrown by the get methods when the key is found but the value has an unexpected type. |
Constructor Summary | |
---|---|
protected |
Properties()
|
Method Summary | |
---|---|
static Properties |
create()
Create an empty Properties object. |
java.lang.Boolean |
getBoolean(java.lang.String key)
Get a Boolean value mapped to the specified key. |
java.util.Date |
getDate(java.lang.String key)
Get a Date object mapped to the specified key. |
java.lang.Double |
getNumber(java.lang.String key)
Get a Double value mapped to the specified key. |
com.google.gwt.core.client.JavaScriptObject |
getObject(java.lang.String key)
Get a JavaScriptObject mapped to the specified key. |
java.lang.String |
getString(java.lang.String key)
Get a String mapped to the specified key. |
void |
remove(java.lang.String key)
Remove the property at the specified key. |
void |
set(java.lang.String key,
java.lang.Boolean value)
Set a property. |
void |
set(java.lang.String key,
java.util.Date value)
Set a property. |
void |
set(java.lang.String key,
java.lang.Double value)
Set a property. |
void |
set(java.lang.String key,
com.google.gwt.core.client.JavaScriptObject value)
Set a property. |
void |
set(java.lang.String key,
java.lang.String value)
Set a property. |
java.lang.String |
typeof(java.lang.String key)
Executes the JavaScript typeof operator against the property with the given key. |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Properties()
Method Detail |
---|
public static Properties create()
public final java.lang.Boolean getBoolean(java.lang.String key) throws Properties.TypeException
key
- The name of the Boolean property.
Properties.TypeException
- if the key is found but the object returned
is not a Boolean.public final java.util.Date getDate(java.lang.String key) throws com.google.gwt.core.client.JavaScriptException, Properties.TypeException
key
- The name of the Date property.
com.google.gwt.core.client.JavaScriptException
- if the key is found but the object returned
is not a Date.
Properties.TypeException
- If the key is found but the value is not an object.public final java.lang.Double getNumber(java.lang.String key) throws Properties.TypeException
key
- The name of the Double property.
Properties.TypeException
- If the key is found but the value is not a
number (integers are fine).public final com.google.gwt.core.client.JavaScriptObject getObject(java.lang.String key) throws Properties.TypeException
key
- The name of the JavaScriptObject property.
Properties.TypeException
- If the key is found but the value is not a
JavaScriptObject.public final java.lang.String getString(java.lang.String key) throws Properties.TypeException
key
- The name of the String property.
Properties.TypeException
- If the key is found but the value is not a
String.public final void remove(java.lang.String key)
key
- The name of the property to remove.public final void set(java.lang.String key, java.lang.Boolean value)
key
- The name of the property.value
- The value of the property.public final void set(java.lang.String key, java.util.Date value)
key
- The name of the property.value
- The value of the property.public final void set(java.lang.String key, java.lang.Double value)
key
- The name of the property.value
- The value of the property.public final void set(java.lang.String key, com.google.gwt.core.client.JavaScriptObject value)
key
- The name of the property.value
- The value of the property.public final void set(java.lang.String key, java.lang.String value)
key
- The name of the property.value
- The value of the property.public final java.lang.String typeof(java.lang.String key)
key
- The name of the property to type check.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |