org.gcube.portlets.user.tdw.client.model.json
Class JSonValue

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by org.gcube.portlets.user.tdw.client.model.json.JSonValue

public final class JSonValue
extends com.google.gwt.core.client.JavaScriptObject

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Constructor Summary
protected JSonValue()
           
 
Method Summary
 boolean getAsBool(String key)
          Returns the value for the specified key as boolean
 Boolean getAsBoolean(String key)
           
 Date getAsDate(String key)
           
 Double getAsDouble(String key)
           
 Float getAsFloat(String key)
           
 Integer getAsInteger(String key)
           
 Long getAsLong(String key)
           
 double getAsNumber(String key)
          Returns the value for the specified key as Number
 String getAsString(String key)
          Returns the value for the specified key as String
 String getType(String key)
           
 boolean isNull(String key)
          Check if the specified value is null.
 void set(String key, boolean value)
          Set the specified value.
 void set(String key, Boolean value)
          Set the specified value.
 void set(String key, Date value)
          Set the specified value.
 void set(String key, double value)
          Set the specified value.
 void set(String key, Double value)
          Set the specified value.
 void set(String key, Float value)
          Set the specified value.
 void set(String key, Integer value)
          Set the specified value.
 void set(String key, Long value)
          Set the specified value.
 void set(String key, String value)
          Set the specified value.
 
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

JSonValue

protected JSonValue()
Method Detail

getAsString

public String getAsString(String key)
Returns the value for the specified key as String

Parameters:
key - the value key.
Returns:
the String value.

set

public void set(String key,
                String value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsNumber

public double getAsNumber(String key)
Returns the value for the specified key as Number

Parameters:
key - the value key.
Returns:
the Number value.

set

public void set(String key,
                double value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsBool

public boolean getAsBool(String key)
Returns the value for the specified key as boolean

Parameters:
key - the value key.
Returns:
the boolean value.

set

public void set(String key,
                boolean value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

isNull

public boolean isNull(String key)
Check if the specified value is null.

Parameters:
key - the value key.
Returns:
True if the values is null, false otherwise.

getType

public String getType(String key)

getAsBoolean

public Boolean getAsBoolean(String key)

set

public void set(String key,
                Boolean value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsDate

public Date getAsDate(String key)

set

public void set(String key,
                Date value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsDouble

public Double getAsDouble(String key)

set

public void set(String key,
                Double value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsFloat

public Float getAsFloat(String key)

set

public void set(String key,
                Float value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsInteger

public Integer getAsInteger(String key)

set

public void set(String key,
                Integer value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.

getAsLong

public Long getAsLong(String key)

set

public void set(String key,
                Long value)
Set the specified value.

Parameters:
key - the key.
value - the value to set.


Copyright © 2013. All Rights Reserved.