Enum AdblockWebView.OptionalBoolean

java.lang.Object
java.lang.Enum<AdblockWebView.OptionalBoolean>
org.adblockplus.libadblockplus.android.webview.AdblockWebView.OptionalBoolean
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AdblockWebView.OptionalBoolean>, java.lang.constant.Constable
Enclosing class:
AdblockWebView

public static enum AdblockWebView.OptionalBoolean
extends java.lang.Enum<AdblockWebView.OptionalBoolean>
Optional boolean value. Puts 2 dimensions (having value/no value + true/false) into 1 dimension to achieve atomic comparisons and null-safety.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    FALSE
    Having a value and it's False
    TRUE
    Having a value and it's True
    UNDEFINED
    No value (equal to "null")
  • Method Summary

    Modifier and Type Method Description
    static AdblockWebView.OptionalBoolean from​(boolean value)
    Convenience method to get enum value from boolean value
    static AdblockWebView.OptionalBoolean valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static AdblockWebView.OptionalBoolean[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static AdblockWebView.OptionalBoolean[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AdblockWebView.OptionalBoolean valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • from

      public static AdblockWebView.OptionalBoolean from​(boolean value)
      Convenience method to get enum value from boolean value
      Parameters:
      value - boolean value
      Returns:
      enum value