Class BooleanLiteral
- java.lang.Object
-
- com.exasol.sql.expression.literal.AbstractLiteral
-
- com.exasol.sql.expression.literal.BooleanLiteral
-
- All Implemented Interfaces:
BooleanExpression
,Literal
,ValueExpression
public final class BooleanLiteral extends AbstractLiteral implements BooleanExpression
This class represents boolean literals (read "true" and "false")
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(BooleanExpressionVisitor visitor)
Accept a visitorvoid
accept(LiteralVisitor visitor)
Accept aLiteralVisitor
.static BooleanLiteral
of(boolean value)
Create a boolean literal from a boolean valuestatic BooleanLiteral
of(String value)
Create a newBooleanLiteral
instance from a String.boolean
toBoolean()
Get boolean value this literal represents.static BooleanExpression[]
toBooleanExpressions(boolean[] values)
Map an array of booleans to and array of BooleanExpressionsString
toString()
-
Methods inherited from class com.exasol.sql.expression.literal.AbstractLiteral
accept
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.exasol.sql.expression.ValueExpression
accept
-
-
-
-
Method Detail
-
of
public static BooleanLiteral of(boolean value)
Create a boolean literal from a boolean value- Parameters:
value
- boolean value- Returns:
- boolean literal
-
of
public static BooleanLiteral of(String value)
Create a newBooleanLiteral
instance from a String.- Parameters:
value
- the string to be turned into a literal- Returns:
- new
BooleanLiteral
instance - Throws:
IllegalArgumentException
- in case the literal is not recognized.
-
toBoolean
public boolean toBoolean()
Get boolean value this literal represents.- Returns:
- boolean value.
-
toBooleanExpressions
public static BooleanExpression[] toBooleanExpressions(boolean[] values)
Map an array of booleans to and array of BooleanExpressions- Parameters:
values
- string literals to be turned into boolean expressions- Returns:
- boolean expressions
-
accept
public void accept(LiteralVisitor visitor)
Description copied from interface:Literal
Accept aLiteralVisitor
.
-
accept
public void accept(BooleanExpressionVisitor visitor)
Description copied from interface:BooleanExpression
Accept a visitor- Specified by:
accept
in interfaceBooleanExpression
- Parameters:
visitor
- visitor to accept
-
-