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 certainDataTypethat 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)booleanequals(Object o)Class<?>getType()Gets theDataTypeof the value.StringgetTypeName()Gets the type name.TgetValue()Gets the value.inthashCode()booleanisComplex()Checks if is complex.voidsetComplex(boolean b)Sets the complex.voidsetType(String type)Sets the type.voidsetValue(T value)Sets the value.StringtoString()-
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 theDataTypeof the value.- Returns:
- the
DataTypeof 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:
toStringin classMyDataEntity
-
-