org.exoplatform.commons.api.settings
Class SettingValue<T>

java.lang.Object
  extended by org.exoplatform.commons.api.settings.SettingValue<T>
All Implemented Interfaces:
Serializable

public class SettingValue<T>
extends Object
implements Serializable

All possible value types are stored in JCR.

See Also:
Serialized Form

Constructor Summary
SettingValue(T value)
          Creates a setting value object with a specified value type.
 
Method Summary
static SettingValue<Boolean> create(Boolean value)
          Creates a setting value object of the Boolean type.
static SettingValue<Double> create(Double value)
          Creates a setting value object of the Double type.
static SettingValue<Long> create(Long value)
          Creates a setting value object of the Long type.
static SettingValue<String> create(String value)
          Creates a setting value object of the String type.
 T getValue()
          Gets the value of the setting object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingValue

public SettingValue(T value)
Creates a setting value object with a specified value type.

Parameters:
value - The value type.
Method Detail

getValue

public T getValue()
Gets the value of the setting object.

Returns:
The value with the specified object type.

create

public static SettingValue<String> create(String value)
Creates a setting value object of the String type.

Parameters:
value - The String value.
Returns:
The setting value object of the String type.

create

public static SettingValue<Long> create(Long value)
Creates a setting value object of the Long type.

Parameters:
value - The Long value.
Returns:
The setting value object of the Long type.

create

public static SettingValue<Double> create(Double value)
Creates a setting value object of the Double type.

Parameters:
value - The Double value.
Returns:
The setting value object of the Double type.

create

public static SettingValue<Boolean> create(Boolean value)
Creates a setting value object of the Boolean type.

Parameters:
value - The Boolean value.
Returns:
The setting value object of the Boolean type.


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.