Class AttrOptions

java.lang.Object
com.iohao.net.common.kit.attr.AttrOptions
All Implemented Interfaces:
Serializable

public class AttrOptions extends Object implements Serializable
Dynamic attribute options
Author:
渔民小镇
See Also:
date:
2022-01-31
  • Constructor Details

    • AttrOptions

      public AttrOptions(AttrOptions attrOptions)
    • AttrOptions

      public AttrOptions()
  • Method Details

    • option

      public <T> T option(AttrOption<T> 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

      public <T> AttrOptions option(AttrOption<T> option, T value)
      Sets a new option with a specific value.

      Use a null value to remove the previously set AttrOption.

      Parameters:
      option - The attribute option
      value - The option value, null to remove the previously set AttrOption.
      Returns:
      this