Package org.faktorips.datatype
Interface Datatype
- All Superinterfaces:
Comparable<Datatype>
- All Known Subinterfaces:
EnumDatatype,NamedDatatype,NumericDatatype,ValueDatatype
- All Known Implementing Classes:
AbstractDatatype,AbstractPrimitiveDatatype,AnyDatatype,ArrayOfValueDatatype,BigDecimalDatatype,BooleanDatatype,CurrencyDatatype,DateDatatype,DecimalDatatype,DefaultGenericEnumDatatype,DefaultGenericValueDatatype,DoubleDatatype,GenericEnumDatatype,GenericValueDatatype,GregorianCalendarAsDateDatatype,GregorianCalendarDatatype,IntegerDatatype,InternationalStringDatatype,JavaClass2DatatypeAdaptor,ListOfTypeDatatype,LocalDateDatatype,LocalDateTimeDatatype,LocalTimeDatatype,LongDatatype,MoneyDatatype,MonthDayDatatype,PrimitiveBooleanDatatype,PrimitiveIntegerDatatype,PrimitiveLongDatatype,StringDatatype,ValueClassDatatype,ValueClassNameDatatype,Void
The type of data similar to a Java class. In most cases a datatype corresponds directly to a Java
class, e.g. a datatype that represents text data (String) corresponds to the class
java.lang.String. However a datatype can exist while the corresponding Java class does
not exist (yet, because it's being generated at a later point in time).
If the datatype represents a value, you can safely cast the datatype to ValueDatatype.
The value datatype provides a uniform way to transform values into Strings and parse Strings back
into values.
- Author:
- Jan Ortmann
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigDecimalDatatypeDatatype representingBigDecimal.static final BooleanDatatypeDatatype representingBoolean.static final DecimalDatatypeDatatype representingDecimal.static final DoubleDatatypeDatatype representingDouble.static final GregorianCalendarAsDateDatatypeDatatype representingGregorianCalendar.static final IntegerDatatypeDatatype representingInteger.static final LongDatatypeDatatype representingLong.static final MoneyDatatypeDatatype representingMoney.static final PrimitiveBooleanDatatypeDatatype representing the primitiveboolean.static final PrimitiveIntegerDatatypeDatatype representing the primitiveint.static final PrimitiveLongDatatypeDatatype representing the primitivelong.static final StringDatatypeDatatype representingjava.lang.Stringstatic final VoidDatatype representingVoid. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the datatype's name.Returns the datatype's qualified name.booleanReturnstrueif the datatype has a special instance representingnull, otherwisefalse.booleanReturnstrueif this datatype is an abstract datatype in means of the object oriented paradigm.booleanisEnum()Returnstrueif this value datatype is an enum datatype.booleanReturnstrueif this datatype represents one of Java's primitive types.booleanReturnstrueif this datatype represents values.booleanisVoid()Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
VOID
Datatype representingVoid. -
BOOLEAN
Datatype representingBoolean. -
DECIMAL
Datatype representingDecimal. -
BIG_DECIMAL
Datatype representingBigDecimal. -
DOUBLE
Datatype representingDouble. -
INTEGER
Datatype representingInteger. -
LONG
Datatype representingLong. -
MONEY
Datatype representingMoney. -
PRIMITIVE_BOOLEAN
Datatype representing the primitiveboolean. -
PRIMITIVE_INT
Datatype representing the primitiveint. -
PRIMITIVE_LONG
Datatype representing the primitivelong. -
STRING
Datatype representingjava.lang.String -
GREGORIAN_CALENDAR
Datatype representingGregorianCalendar. Note that in Faktor-IPS values of that datatype only contain the information about the date, not the time.
-
-
Method Details
-
getName
String getName()Returns the datatype's name. -
getQualifiedName
String getQualifiedName()Returns the datatype's qualified name.The qualified name identifies the datatype.
-
isVoid
boolean isVoid() -
isPrimitive
boolean isPrimitive()Returnstrueif this datatype represents one of Java's primitive types. -
isAbstract
boolean isAbstract()Returnstrueif this datatype is an abstract datatype in means of the object oriented paradigm. -
isValueDatatype
boolean isValueDatatype()Returnstrueif this datatype represents values.If the method returns
true, the datatype can be safely casted toValueDatatype. -
isEnum
boolean isEnum()Returnstrueif this value datatype is an enum datatype. In this case the instance can be cast toEnumDatatype. Returnsfalseotherwise. -
hasNullObject
boolean hasNullObject()Returnstrueif the datatype has a special instance representingnull, otherwisefalse. The design pattern is called the null-object pattern.- See Also:
-