Class DataObject<T>
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.policy.parameter.DataObject<T>
-
- Type Parameters:
T
- the type of the value. Must be one ofDataType
.
public class DataObject<T> extends MyDataEntity
A value of a certainDataType
that is currently supported by MYDATA.- Author:
- Fraunhofer IESE
-
-
Constructor Summary
Constructors Constructor Description DataObject()
Used for JAXBDataObject(Class<T> type)
Instantiates a new data object.DataObject(T value)
Instantiates a new data object.DataObject(T value, Class<T> clazz)
Instantiates a new data object.DataObject(T value, Type type)
*.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> DataObject<T>
constructClone(DataObject<T> dataObject)
boolean
equals(Object o)
Class<?>
getType()
Gets theDataType
of the value.String
getTypeName()
Gets the type name.T
getValue()
Gets the value.int
hashCode()
boolean
isComplex()
Checks if is complex.void
setComplex(boolean b)
Sets the complex.void
setType(String type)
Sets the type.void
setValue(T value)
Sets the value.String
toString()
-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, validate, validateAndNullCheck
-
-
-
-
Constructor Detail
-
DataObject
public DataObject()
Used for JAXB
-
DataObject
public DataObject(Class<T> type)
Instantiates a new data object.- Parameters:
type
- the type
-
DataObject
public DataObject(T value)
Instantiates a new data object.- Parameters:
value
- the value
-
DataObject
public DataObject(T value, Class<T> clazz)
Instantiates a new data object.- Parameters:
value
- the valueclazz
- the clazz
-
-
Method Detail
-
constructClone
public static <T> DataObject<T> constructClone(DataObject<T> dataObject)
-
getType
public Class<?> getType()
Gets theDataType
of the value.- Returns:
- the
DataType
of the value
-
setType
public void setType(String type)
Sets the type.- Parameters:
type
- the type to set
-
getTypeName
public String getTypeName()
Gets the type name.- Returns:
- the type name
-
getValue
public T getValue()
Gets the value.- Returns:
- the value
-
setValue
public void setValue(T value)
Sets the value.- Parameters:
value
- the new value
-
isComplex
public boolean isComplex()
Checks if is complex.- Returns:
- true, if is complex
-
setComplex
public void setComplex(boolean b)
Sets the complex.- Parameters:
b
- the new complex
-
toString
public String toString()
- Overrides:
toString
in classMyDataEntity
-
-