T
- the type of the datapublic abstract class DataType<T>
extends java.lang.Object
DataTypes
Modifier | Constructor and Description |
---|---|
protected |
DataType(java.lang.String name,
java.lang.Class<T> javaClass)
Creates a new data type instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
abstract T |
getDefaultValue()
Gets the default value of this data type, eg 0 for numbers or an empty String for text.
|
java.lang.Class<T> |
getJavaClass()
Gets the Java class of the data objects this data type represents.
|
java.lang.String |
getName()
Gets the name of this data type.
|
int |
hashCode() |
abstract boolean |
isComplex()
Checks if this data type is complex or not.
|
java.lang.String |
toString() |
protected DataType(java.lang.String name, java.lang.Class<T> javaClass)
name
- the name of the data type. This must be unique among all data typesjavaClass
- the Java class of the data objects this data type representspublic final java.lang.String getName()
public final java.lang.Class<T> getJavaClass()
public abstract T getDefaultValue()
public abstract boolean isComplex()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object