Package com.opencloud.slee.rest.common
Class ApiOption<T>
- java.lang.Object
 - 
- com.opencloud.slee.rest.common.ApiOption<T>
 
 
- 
- Type Parameters:
 T- the type associated with the configuration option.
public final class ApiOption<T> extends java.lang.ObjectA configuration option. 
- 
- 
Constructor Summary
Constructors Constructor Description ApiOption(java.lang.String name)Create a new configuration option 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApiOption<java.lang.String>base64PasswordOption(java.lang.String name)Create a new configuration option, with a value that is a String containing base64 charactersstatic ApiOption<java.lang.Boolean>booleanOption(java.lang.String name)Create a new configuration option, with a value that is a booleanstatic <E extends java.lang.Enum<E>>
ApiOption<E>enumOption(java.lang.String name, E defaultValue)Create a new configuration option, with a value that is an Enumbooleanequals(java.lang.Object o)inthashCode()TinitialValue()Get the initial valuejava.lang.Stringname()Get the configuration option namestatic ApiOption<java.lang.String>stringOption(java.lang.String name)Create a new configuration option, with a value that is a non-empty Stringjava.lang.StringtoString()static ApiOption<java.lang.String>urlOption(java.lang.String name)Create a new configuration option, with a value that is a valid URLVerifyResultverify(T value)Verify the validity of a value with respect to this configuration option 
 - 
 
- 
- 
Method Detail
- 
name
public java.lang.String name()
Get the configuration option name- Returns:
 - the name of the configuration option
 
 
- 
initialValue
public T initialValue()
Get the initial value- Returns:
 - the initial value of this configuration option
 
 
- 
verify
public VerifyResult verify(T value)
Verify the validity of a value with respect to this configuration option- Parameters:
 value- the value to verify- Returns:
 - the outcome of verifying the configuration option value
 
 
- 
stringOption
public static ApiOption<java.lang.String> stringOption(java.lang.String name)
Create a new configuration option, with a value that is a non-empty String- Parameters:
 name- the name of the configuration option- Returns:
 - the new configuration option
 
 
- 
urlOption
public static ApiOption<java.lang.String> urlOption(java.lang.String name)
Create a new configuration option, with a value that is a valid URL- Parameters:
 name- the name of the configuration option- Returns:
 - the new configuration option
 
 
- 
base64PasswordOption
public static ApiOption<java.lang.String> base64PasswordOption(java.lang.String name)
Create a new configuration option, with a value that is a String containing base64 characters- Parameters:
 name- the name of the configuration option- Returns:
 - the new configuration option
 
 
- 
booleanOption
public static ApiOption<java.lang.Boolean> booleanOption(java.lang.String name)
Create a new configuration option, with a value that is a boolean- Parameters:
 name- the name of the configuration option- Returns:
 - the new configuration option
 
 
- 
enumOption
public static <E extends java.lang.Enum<E>> ApiOption<E> enumOption(java.lang.String name, E defaultValue)
Create a new configuration option, with a value that is an Enum- Type Parameters:
 E- the Enum type- Parameters:
 name- the name of the configuration optiondefaultValue- the default value of the configuration option- Returns:
 - the new configuration option
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
 - 
 
 -