Package com.blazebit.query.spi
Interface DataFormat
- All Known Subinterfaces:
CollectionDataFormat
,MapDataFormat
public interface DataFormat
An object that describes the data format of a type.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataFormat
Returns a new enum data format for the given type.Returns the fields encapsulated by this format.getType()
Returns the Java type for this format.default boolean
isEnum()
Returns whether this data format represents an enum.static DataFormat
of
(Type type, List<DataFormatField> fields) Returns a new data format for the given type and fields.
-
Method Details
-
getType
Type getType()Returns the Java type for this format.- Returns:
- the Java type for this format
-
getFields
List<DataFormatField> getFields()Returns the fields encapsulated by this format.- Returns:
- the fields encapsulated by this format
-
isEnum
default boolean isEnum()Returns whether this data format represents an enum.- Returns:
- whether this data format represents an enum.
-
of
Returns a new data format for the given type and fields.- Parameters:
type
- The typefields
- The fields of the type- Returns:
- the data format
-
enumType
Returns a new enum data format for the given type.- Parameters:
type
- The enum type- Returns:
- the data format
-