Package com.casper.sdk.model.clvalue
Class AbstractCLValueWithChildren<T,P extends AbstractCLTypeWithChildren>
- java.lang.Object
-
- com.casper.sdk.model.clvalue.AbstractCLValue<T,P>
-
- com.casper.sdk.model.clvalue.AbstractCLValueWithChildren<T,P>
-
- All Implemented Interfaces:
CasperDeserializableObject,CasperSerializableObject,dev.oak3.sbs4j.interfaces.DeserializableObject,dev.oak3.sbs4j.interfaces.SerializableObject
- Direct Known Subclasses:
CLValueList,CLValueMap,CLValueOption,CLValueTuple1,CLValueTuple2,CLValueTuple3
public abstract class AbstractCLValueWithChildren<T,P extends AbstractCLTypeWithChildren> extends AbstractCLValue<T,P>
Abstract class for those CLValues which have a child collection- Since:
- 0.0.1
- See Also:
AbstractCLValue
-
-
Constructor Summary
Constructors Constructor Description AbstractCLValueWithChildren()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)protected voidchildTypesSet()This fires deserialization in case the json/jackson mapped bytes before CLType This only happens when whe have CLTypes with children types.booleanequals(java.lang.Object o)inthashCode()protected abstract voidsetChildTypes(T value)protected voidsetJsonBytes(java.lang.String bytes)Sets the bytes and if the CLType is already set, fires bytes deserialization-
Methods inherited from class com.casper.sdk.model.clvalue.AbstractCLValue
createInstanceFromBytes, deserialize, deserialize, deserializeCustom, encodeType, getBytes, getClType, getJsonBytes, getParsed, getValue, serialize, serializePrefixWithLength, setBytes, setClType, setParsed, setValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Method Detail
-
setChildTypes
protected abstract void setChildTypes(T value)
-
childTypesSet
protected void childTypesSet()
This fires deserialization in case the json/jackson mapped bytes before CLType This only happens when whe have CLTypes with children types.Should always be called in the end of the json setter for ClType within CLValueWithChildren
-
setJsonBytes
@ExcludeFromJacocoGeneratedReport protected void setJsonBytes(java.lang.String bytes)
Sets the bytes and if the CLType is already set, fires bytes deserialization- Overrides:
setJsonBytesin classAbstractCLValue<T,P extends AbstractCLTypeWithChildren>- Parameters:
bytes- the input bytes for this CLValue
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAbstractCLValue<T,P extends AbstractCLTypeWithChildren>
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqualin classAbstractCLValue<T,P extends AbstractCLTypeWithChildren>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractCLValue<T,P extends AbstractCLTypeWithChildren>
-
-