public class AbstractElementFactory<T extends SequenceElement> extends java.lang.Object implements SequenceElementFactory<T>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
AbstractElementFactory(java.lang.Class<? extends SequenceElement> cls)
This is the only constructor available for AbstractElementFactory
|
Modifier and Type | Method and Description |
---|---|
T |
deserialize(java.lang.String json)
This method builds object from provided JSON
|
java.lang.String |
serialize(T element)
This method serializaes object into JSON string
|
public AbstractElementFactory(@NonNull java.lang.Class<? extends SequenceElement> cls)
cls
- class that going to be serialized/deserialized using this instance. I.e.: VocabWord.classpublic T deserialize(java.lang.String json)
deserialize
in interface SequenceElementFactory<T extends SequenceElement>
json
- JSON for restored objectpublic java.lang.String serialize(T element)
serialize
in interface SequenceElementFactory<T extends SequenceElement>
element
-