public class BolType extends BaseValueType<Boolean>
Boolean type.
This class is threadsafe and uses a singleton pattern to prevent multiple instances, since all users can safely share the same instance.
clazzType| Modifier and Type | Method and Description |
|---|---|
Boolean |
cast(Object o)
Attempt to cast the passed object to the generic type T.
|
static BolType |
get()
Deprecated.
since 0.4.1. Use
instance() instead |
static BolType |
instance() |
Boolean |
parse(String sourceValue)
Parses a String to a
Boolean. |
getDestinationType, isParsable, toString@Deprecated public static BolType get()
instance() insteadBolType()public Boolean parse(String sourceValue) throws IllegalArgumentException
Boolean. The String should already be trimmed.
Note: The parsing behavior may change in the 0.5.0 release to have an explicit list of False values. See Issue 658.
Trims the value and returns True if the trimmed String
matches one of these values (case-insensitive) :
False is returned.
If the value is null after trimming, null is returned.
sourceValue - The source string, which should already be trimmed and may be nullIllegalArgumentException - (doesn't currently happen)public Boolean cast(Object o) throws RuntimeException
ValueTypeRuntimeExceptionCopyright © 2021. All rights reserved.