Package jetbrains.buildServer.util
Class EmptyOptionSupport
- java.lang.Object
-
- jetbrains.buildServer.util.EmptyOptionSupport
-
- All Implemented Interfaces:
OptionSupport,OptionSupportEx
public class EmptyOptionSupport extends Object implements OptionSupportEx
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyOptionSupportINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Option[]getChangedOptions()Return options with changed values, i.e.<T> TgetDeclaredOption(Option<T> option)Get option value declared in this BuildTypeSettings<T> TgetOption(Option<T> option)Get option value<T> TgetOptionDefaultValue(Option<T> option)Collection<Option>getOptions()Collection<Option>getOwnOptions()Return options defined in this object, i.e.<T> OptionValue<T>getOwnOptionValue(Option<T> option)Get option value-spec pair.voidreadFrom(org.jdom.Element parentEl)<T> voidsetOption(Option<T> option, T value)Set option value, clears value if it is the same as default<T> voidsetOption(Option<T> option, T value, ControlDescription spec)Set option value and its spec-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.util.OptionSupportEx
getOptionSpec, getRawOptionSpec
-
-
-
-
Field Detail
-
INSTANCE
@NotNull public static final EmptyOptionSupport INSTANCE
-
-
Method Detail
-
setOption
public <T> void setOption(@NotNull Option<T> option, @Nullable T value, @Nullable ControlDescription spec)Description copied from interface:OptionSupportExSet option value and its spec
- Specified by:
setOptionin interfaceOptionSupportEx
-
getOwnOptionValue
@Nullable public <T> OptionValue<T> getOwnOptionValue(@NotNull Option<T> option)
Description copied from interface:OptionSupportExGet option value-spec pair. If the option is not defined - null is returned in OptionValue.getValue()
- Specified by:
getOwnOptionValuein interfaceOptionSupportEx- Returns:
-
readFrom
public void readFrom(@NotNull org.jdom.Element parentEl)- Specified by:
readFromin interfaceOptionSupportEx
-
setOption
public <T> void setOption(@NotNull Option<T> option, @NotNull T value)Description copied from interface:OptionSupportSet option value, clears value if it is the same as default- Specified by:
setOptionin interfaceOptionSupport- Parameters:
option- option to set value forvalue- option value
-
getOwnOptions
@NotNull public Collection<Option> getOwnOptions()
Description copied from interface:OptionSupportReturn options defined in this object, i.e. options for which some value has been set usingOptionSupport.setOption(Option, Object)method.- Specified by:
getOwnOptionsin interfaceOptionSupport- Returns:
- see above
-
getOptions
@NotNull public Collection<Option> getOptions()
- Specified by:
getOptionsin interfaceOptionSupport- Returns:
- combined set of options - own and inherited
-
getChangedOptions
@NotNull public Option[] getChangedOptions()
Description copied from interface:OptionSupportReturn options with changed values, i.e. options with non-default values- Specified by:
getChangedOptionsin interfaceOptionSupport- Returns:
- see above
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)Description copied from interface:OptionSupportGet option value- Specified by:
getOptionin interfaceOptionSupport- Parameters:
option- option to retrieve value for- Returns:
- value of the option. If value wasn't set, Option:getDefaultValue is returned
-
getOptionDefaultValue
@NotNull public <T> T getOptionDefaultValue(@NotNull Option<T> option)- Specified by:
getOptionDefaultValuein interfaceOptionSupport- Parameters:
option- option whose default value to return- Returns:
- default value for specified option
-
getDeclaredOption
@Nullable public <T> T getDeclaredOption(Option<T> option)
Description copied from interface:OptionSupportGet option value declared in this BuildTypeSettings
- Specified by:
getDeclaredOptionin interfaceOptionSupport- Parameters:
option- option to retrieve value for- Returns:
- value of the option. If value wasn't set, null is returned
-
-