public class LegacyCopyStrategyAdapter extends java.lang.Object implements ReadWriteCopyStrategy<Element>
Modifier and Type | Field and Description |
---|---|
private CopyStrategy |
legacyCopyStrategy |
Constructor and Description |
---|
LegacyCopyStrategyAdapter(CopyStrategy legacyCopyStrategy)
create a LegacyCopyStrategyAdapter
|
Modifier and Type | Method and Description |
---|---|
Element |
copyForRead(Element storedValue)
Reconstruct an object from its storage-ready copy.
|
Element |
copyForWrite(Element value)
Deep copies some object and returns an internal storage-ready copy
|
private final CopyStrategy legacyCopyStrategy
public LegacyCopyStrategyAdapter(CopyStrategy legacyCopyStrategy)
legacyCopyStrategy
- the legacy CopyStrategy to adaptpublic Element copyForWrite(Element value)
copyForWrite
in interface ReadWriteCopyStrategy<Element>
value
- the value to copypublic Element copyForRead(Element storedValue)
copyForRead
in interface ReadWriteCopyStrategy<Element>
storedValue
- the storage-ready copy