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 voidaccept(BooleanExpressionVisitor visitor)Accept a visitorvoidaccept(LiteralVisitor visitor)Accept aLiteralVisitor.static BooleanLiteralof(boolean value)Create a boolean literal from a boolean valuestatic BooleanLiteralof(String value)Create a newBooleanLiteralinstance from a String.booleantoBoolean()Get boolean value this literal represents.static BooleanExpression[]toBooleanExpressions(boolean[] values)Map an array of booleans to and array of BooleanExpressionsStringtoString()-
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 newBooleanLiteralinstance from a String.- Parameters:
value- the string to be turned into a literal- Returns:
- new
BooleanLiteralinstance - 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:LiteralAccept aLiteralVisitor.
-
accept
public void accept(BooleanExpressionVisitor visitor)
Description copied from interface:BooleanExpressionAccept a visitor- Specified by:
acceptin interfaceBooleanExpression- Parameters:
visitor- visitor to accept
-
-