|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjetbrains.buildServer.util.Option<Type>
Type - type of the optionpublic abstract class Option<Type>
Represents a named option of given Type and some default value.
| Constructor Summary | |
|---|---|
Option(java.lang.String key,
Type defaultValue)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
static Option |
fromKey(java.lang.String key)
Find option with given key in the registry of options |
abstract Type |
fromString(java.lang.String value)
Option values are serialized to strings using toString() call. |
Type |
getDefaultValue()
|
java.lang.String |
getKey()
|
int |
hashCode()
|
java.lang.String |
toString()
|
abstract java.lang.String |
toString(Type value)
Serialize option value to string |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Option(@NonNls@NotNull
java.lang.String key,
@NotNull
Type defaultValue)
key - name of the parameter. Used in equals and hashCodedefaultValue - default value for this option, if not specified| Method Detail |
|---|
public abstract Type fromString(java.lang.String value)
value - serialized option value (Type#toString() method is used for serialization)
public abstract java.lang.String toString(Type value)
value - value to serialize
@Nullable public static Option fromKey(java.lang.String key)
key - option key, see getKey()
@NotNull public java.lang.String getKey()
@NotNull public Type getDefaultValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||