Top Description Fields Constructors Methods
liquibase.util

public Class BooleanUtil

extends Object
Class Inheritance
Known Direct Subclasses
liquibase.util.BooleanUtils, liquibase.util.BooleanParser
Imports
java.util.Arrays, .HashSet, .Set

Various utility methods for working with boolean objects.

Field Summary

Modifier and TypeField and Description
private static final Set<String>
private static final Set<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static boolean
public static boolean
isTrue(Boolean value)

Checks if a Boolean value is true, handling null as false.

public static boolean

Returns:

true, if represents values "true", "t", "yes", "y", or integer >= 1, false otherwise
parseBoolean
(String
not trimmed string
booleanStr
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

falseValuesback to summary
private static final Set<String> falseValues
trueValuesback to summary
private static final Set<String> trueValues

Constructor Detail

BooleanUtilback to summary
public BooleanUtil()

Method Detail

isTrueback to summary
private static boolean isTrue(String str)
isTrueback to summary
public static boolean isTrue(Boolean value)

Checks if a Boolean value is true, handling null as false. - isTrue(null) = false - isTrue(false) = false - isTrue(true) = true

parseBooleanback to summary
public static boolean parseBoolean(String booleanStr)
Parameters
booleanStr:String

not trimmed string

Returns:boolean

true, if represents values "true", "t", "yes", "y", or integer >= 1, false otherwise