Class AttrOptions
java.lang.Object
com.iohao.net.common.kit.attr.AttrOptions
- All Implemented Interfaces:
Serializable
Dynamic attribute options
- Author:
- 渔民小镇
- See Also:
- date:
- 2022-01-31
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Toption(AttrOption<T> option) Gets the option value.<T> AttrOptionsoption(AttrOption<T> option, T value) Sets a new option with a specific value.
-
Constructor Details
-
AttrOptions
-
AttrOptions
public AttrOptions()
-
-
Method Details
-
option
Gets the option value.Returns the default value if the option does not exist.
- Parameters:
option- The attribute option- Returns:
- The option value, or the default option value if the option does not exist.
-
option
Sets a new option with a specific value.Use a null value to remove the previously set
AttrOption.- Parameters:
option- The attribute optionvalue- The option value, null to remove the previously setAttrOption.- Returns:
- this
-