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
-
Method Summary
Modifier and Type Method Description static AdblockWebView.OptionalBooleanfrom(boolean value)Convenience method to get enum value from boolean valuestatic AdblockWebView.OptionalBooleanvalueOf(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, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
UNDEFINED
No value (equal to "null") -
TRUE
Having a value and it's True -
FALSE
Having a value and it's False
-
-
Method Details
-
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
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 namejava.lang.NullPointerException- if the argument is null
-
from
Convenience method to get enum value from boolean value- Parameters:
value- boolean value- Returns:
- enum value
-