[jOOQ/jOOQ#14538] Add DataType.isFloat()
This commit is contained in:
parent
4882d723ba
commit
5ec55cbeef
@ -1250,6 +1250,18 @@ public interface DataType<T> extends Named {
|
||||
*/
|
||||
boolean isInteger();
|
||||
|
||||
/**
|
||||
* Whether this data type is any floating point data type.
|
||||
* <p>
|
||||
* This applies to any of these types:
|
||||
* <ul>
|
||||
* <li> {@link SQLDataType#FLOAT}</li>
|
||||
* <li> {@link SQLDataType#DOUBLE}</li>
|
||||
* <li> {@link SQLDataType#REAL}</li>
|
||||
* </ul>
|
||||
*/
|
||||
boolean isFloat();
|
||||
|
||||
/**
|
||||
* Whether this data type is any boolean data type.
|
||||
* <p>
|
||||
|
||||
@ -802,6 +802,14 @@ implements
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFloat() {
|
||||
Class<?> tType = tType0();
|
||||
return Float.class == tType
|
||||
|| Double.class == tType
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isBoolean() {
|
||||
return tType0() == Boolean.class;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user