Modifier and Type | Method and Description |
---|---|
void |
accept(ColumnVisitor visitor)
Accepts a
ColumnVisitor to be able to be traversed. |
int |
compareTo(Column<java.lang.Boolean> o) |
BooleanColumn |
copyWith(java.lang.String name)
Creates a copy of this
Column with the specified name. |
boolean |
equals(java.lang.Object o) |
boolean |
getBooleanValue()
Returns the BOOLEAN value of this
Column as a Java boolean type. |
DataType |
getDataType()
Returns the data type of this
Column . |
java.lang.String |
getName()
Returns the name of this
Column . |
java.util.Optional<java.lang.Boolean> |
getValue()
Returns the value of this
Column . |
java.lang.Object |
getValueAsObject()
Returns the value of this
Column as a Java object type. |
int |
hashCode() |
boolean |
hasNullValue()
Indicates whether the value of this
Column is NULL. |
static BooleanColumn |
of(java.lang.String columnName,
boolean value)
Returns a Boolean column instance with the specified column name and value.
|
static BooleanColumn |
ofNull(java.lang.String columnName)
Returns a Boolean column instance with the specified column name and a null value.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBigIntValue, getBlobValue, getBlobValueAsByteBuffer, getBlobValueAsBytes, getDateValue, getDoubleValue, getFloatValue, getIntValue, getTextValue, getTimestampTZValue, getTimestampValue, getTimeValue
public java.lang.String getName()
Column
Column
.public java.util.Optional<java.lang.Boolean> getValue()
Column
Column
.public boolean getBooleanValue()
Column
Column
as a Java boolean type.
Note that, due to its signature, this method cannot return null. If the value is NULL, it
will return false. If this doesn't work for you, either call Column.hasNullValue()
before
calling this method, or use Column.getValueAsObject()
instead.
getBooleanValue
in interface Column<java.lang.Boolean>
Column
public BooleanColumn copyWith(java.lang.String name)
Column
Column
with the specified name.public DataType getDataType()
Column
Column
.getDataType
in interface Column<java.lang.Boolean>
Column
public boolean hasNullValue()
Column
Column
is NULL.hasNullValue
in interface Column<java.lang.Boolean>
Column
is NULL@Nullable public java.lang.Object getValueAsObject()
Column
Column
as a Java object type.
If the columns is a BOOLEAN type, it returns a Boolean
object. If the columns is an
INT type, it returns an Integer
object. If the columns is a BIGINT type, it returns a
LONG
object. If the columns is a FLOAT type, it returns a FLOAT
object. If the
columns is a DOUBLE type, it returns a DOUBLE
object. If the columns is a TEXT type, it
returns a String
object. If the columns is a BLOB type, it returns a ByteBuffer
object. If the columns is a DATE type, it returns a LocalDate
object. If the columns is
a TIME type, it returns a LocalTime
object. If the columns is a TIMESTAMP type, it
returns a LocalDateTime
object. If the columns is a TIMESTAMPTZ type, it returns a
Instant
object.
getValueAsObject
in interface Column<java.lang.Boolean>
Column
. if the value is NULL, nullpublic int compareTo(Column<java.lang.Boolean> o)
compareTo
in interface java.lang.Comparable<Column<java.lang.Boolean>>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void accept(ColumnVisitor visitor)
Column
ColumnVisitor
to be able to be traversed.public java.lang.String toString()
toString
in class java.lang.Object
public static BooleanColumn of(java.lang.String columnName, boolean value)
columnName
- a column namevalue
- a column valuepublic static BooleanColumn ofNull(java.lang.String columnName)
columnName
- a column name