Package org.faktorips.datatype
Class AbstractDatatype
java.lang.Object
org.faktorips.datatype.AbstractDatatype
- All Implemented Interfaces:
Comparable<Datatype>,Datatype
- Direct Known Subclasses:
AbstractPrimitiveDatatype,ArrayOfValueDatatype,InternationalStringDatatype,JavaClass2DatatypeAdaptor,ListOfTypeDatatype,ValueClassNameDatatype,Void
Abstract super class for Datatype implementations.
- Author:
- Jan Ortmann
-
Field Summary
Fields inherited from interface org.faktorips.datatype.Datatype
BIG_DECIMAL, BOOLEAN, DECIMAL, DOUBLE, GREGORIAN_CALENDAR, INTEGER, LONG, MONEY, PRIMITIVE_BOOLEAN, PRIMITIVE_INT, PRIMITIVE_LONG, STRING, VOID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.faktorips.runtime.MessageListintCompares the two type's alphabetically by their name.booleaninthashCode()booleanReturnstrueif the datatype has a special instance representingnull, otherwisefalse.booleanisEnum()Returnstrueif this value datatype is an enum datatype.booleanisVoid()booleanmatchDatatype(Datatype datatype) Returns true if the dataType is instance of AnyDatatype otherwise it callequals(Object).toString()Returns the type's name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.faktorips.datatype.Datatype
getName, getQualifiedName, isAbstract, isPrimitive, isValueDatatype
-
Constructor Details
-
AbstractDatatype
public AbstractDatatype()
-
-
Method Details
-
checkReadyToUse
public org.faktorips.runtime.MessageList checkReadyToUse() -
isVoid
public boolean isVoid()Description copied from interface:Datatype -
isEnum
public boolean isEnum()Description copied from interface:DatatypeReturnstrueif this value datatype is an enum datatype. In this case the instance can be cast toEnumDatatype. Returnsfalseotherwise. -
hashCode
public int hashCode() -
equals
-
matchDatatype
Returns true if the dataType is instance of AnyDatatype otherwise it callequals(Object). -
toString
Returns the type's name. -
compareTo
Compares the two type's alphabetically by their name.- Specified by:
compareToin interfaceComparable<Datatype>
-
hasNullObject
public boolean hasNullObject()Description copied from interface:DatatypeReturnstrueif the datatype has a special instance representingnull, otherwisefalse. The design pattern is called the null-object pattern.- Specified by:
hasNullObjectin interfaceDatatype- See Also:
-