Package com.palantir.util
Enum PersistableBoolean
- java.lang.Object
-
- java.lang.Enum<PersistableBoolean>
-
- com.palantir.util.PersistableBoolean
-
- All Implemented Interfaces:
Persistable
,Serializable
,Comparable<PersistableBoolean>
public enum PersistableBoolean extends Enum<PersistableBoolean> implements Persistable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.palantir.common.persist.Persistable
Persistable.Hydrator<T>
-
-
Field Summary
Fields Modifier and Type Field Description static Persistable.Hydrator<PersistableBoolean>
BYTES_HYDRATOR
returns FALSE iff the provided byte array is a single zero byte.-
Fields inherited from interface com.palantir.common.persist.Persistable
HYDRATOR_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isTrue()
static PersistableBoolean
of(boolean value)
static PersistableBoolean
valueOf(String name)
Returns the enum constant of this type with the specified name.static PersistableBoolean[]
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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.palantir.common.persist.Persistable
persistToBytes
-
-
-
-
Enum Constant Detail
-
TRUE
public static final PersistableBoolean TRUE
-
FALSE
public static final PersistableBoolean FALSE
-
-
Field Detail
-
BYTES_HYDRATOR
public static final Persistable.Hydrator<PersistableBoolean> BYTES_HYDRATOR
returns FALSE iff the provided byte array is a single zero byte. Otherwise returns TRUE
-
-
Method Detail
-
values
public static PersistableBoolean[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PersistableBoolean c : PersistableBoolean.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PersistableBoolean valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
of
public static PersistableBoolean of(boolean value)
-
isTrue
public boolean isTrue()
-
-