Package org.faktorips.datatype
Class PrimitiveBooleanDatatype
java.lang.Object
org.faktorips.datatype.AbstractDatatype
org.faktorips.datatype.AbstractPrimitiveDatatype
org.faktorips.datatype.PrimitiveBooleanDatatype
- All Implemented Interfaces:
Comparable<Datatype>,Datatype,ValueDatatype
Datatype for the primitive
boolean.-
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 TypeMethodDescriptionReturns the datatype's default value.getName()Returns the datatype's name.Returns the datatype's qualified name.This method parses the given string and returns the value as an instance of the class this value datatype represents.If this datatype represents a primitive type, this method returns the datatype that represents the wrapper class.booleanMethods inherited from class org.faktorips.datatype.AbstractPrimitiveDatatype
areValuesEqual, compare, getNullObjectId, hasNullObject, isAbstract, isImmutable, isMutable, isParsable, isPrimitive, isValueDatatype, valueToStringMethods inherited from class org.faktorips.datatype.AbstractDatatype
checkReadyToUse, compareTo, equals, hashCode, isEnum, isVoid, matchDatatype, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.faktorips.datatype.ValueDatatype
checkReadyToUse, isNull
-
Constructor Details
-
PrimitiveBooleanDatatype
public PrimitiveBooleanDatatype()
-
-
Method Details
-
getName
Description copied from interface:DatatypeReturns the datatype's name. -
getQualifiedName
Description copied from interface:DatatypeReturns the datatype's qualified name.The qualified name identifies the datatype.
-
getDefaultValue
Description copied from interface:ValueDatatypeReturns the datatype's default value. For datatypes representing objects the method returnsnull. For datatypes representing Java primitives the Java default value is returned, e.g. 0 for int.- See Also:
-
getWrapperType
Description copied from interface:ValueDatatypeIf this datatype represents a primitive type, this method returns the datatype that represents the wrapper class. Returnsnullif this datatype does not represent a primitive. -
getValue
Description copied from interface:ValueDatatypeThis method parses the given string and returns the value as an instance of the class this value datatype represents.Use with caution: During development time Faktor-IPS maintains all values with their string representation. This allows to change the value's datatype without the need to convert the value from one class to another (e.g. if the string representation is 42 you can change the datatype from integer to string without converting the integer object to a string object.
May throw different exceptions if the given string does not represent any value, for example a
NumberFormatExceptionwhen"twelve"is passed toPrimitiveIntegerDatatype.getValue(String).- Specified by:
getValuein interfaceValueDatatype- Specified by:
getValuein classAbstractPrimitiveDatatype- Parameters:
value- the string representation of a value- Returns:
- the value as instance of the class this datatype represents
- See Also:
-
supportsCompare
public boolean supportsCompare()- Returns:
trueif this datatype is able to compare two values.
-