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

public abstract class AbstractDatatype extends Object implements Datatype
Abstract super class for Datatype implementations.
Author:
Jan Ortmann
  • Constructor Details

    • AbstractDatatype

      public AbstractDatatype()
  • Method Details

    • checkReadyToUse

      public org.faktorips.runtime.MessageList checkReadyToUse()
    • isVoid

      public boolean isVoid()
      Description copied from interface: Datatype
      Returns true if this is the Datatype Void, otherwise false.
      Specified by:
      isVoid in interface Datatype
    • isEnum

      public boolean isEnum()
      Description copied from interface: Datatype
      Returns true if this value datatype is an enum datatype. In this case the instance can be cast to EnumDatatype. Returns false otherwise.
      Specified by:
      isEnum in interface Datatype
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • matchDatatype

      public boolean matchDatatype(Datatype datatype)
      Returns true if the dataType is instance of AnyDatatype otherwise it call equals(Object).
    • toString

      public String toString()
      Returns the type's name.
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Datatype o)
      Compares the two type's alphabetically by their name.
      Specified by:
      compareTo in interface Comparable<Datatype>
    • hasNullObject

      public boolean hasNullObject()
      Description copied from interface: Datatype
      Returns true if the datatype has a special instance representing null, otherwise false. The design pattern is called the null-object pattern.
      Specified by:
      hasNullObject in interface Datatype
      See Also:
      • NullObject