public class IRandomAccessAdapter extends AbstractLegacyAdapter<IRandomAccess,IRandomAccess>
IRandomAccess
and
IRandomAccess
Delegation is maintained by two WeakHashTables. See AbstractLegacyAdapter
Functionally, the delegation is handled in the nested classes - one for wrapping from ome.scifio.io.IRandomAccess to loci.common.IRandomAccess, and one for the reverse direction.
Modifier and Type | Class and Description |
---|---|
static class |
IRandomAccessAdapter.LegacyWrapper
This class can be used to wrap loci.common.IRandomAccess
objects and be passed to API expecting an ome.scifio.io.IRandomAccess
object.
|
static class |
IRandomAccessAdapter.ModernWrapper
This class can be used to wrap ome.scifio.io.IRandomAccess
objects and be passed to API expecting a loci.common.IRandomAccess
object.
|
Constructor and Description |
---|
IRandomAccessAdapter() |
Modifier and Type | Method and Description |
---|---|
protected IRandomAccess |
wrapToLegacy(IRandomAccess modern)
Used Wraps the given modern object to a new instance of its legacy equivalent.
|
protected IRandomAccess |
wrapToModern(IRandomAccess legacy)
Wraps the given legacy object to a new instance of its modern equivalent.
|
clear, getLegacy, getModern
protected IRandomAccess wrapToLegacy(IRandomAccess modern)
AbstractLegacyAdapter
This is a "stupid" operation that always wraps to a new instance.
This method must be defined at the concrete implementation level as it requires knowledge of a specific class that extends L but is capable of wrapping M. Doing so reduces code/logic repetition by maintaining a single getLegacy implementation.
wrapToLegacy
in class AbstractLegacyAdapter<IRandomAccess,IRandomAccess>
modern
- - An instance of the modern class.protected IRandomAccess wrapToModern(IRandomAccess legacy)
AbstractLegacyAdapter
This is a "stupid" operation that always wraps to a new instance.
This method must be defined at the concrete implementation level as it requires knowledge of a specific class that extends M but is capable of wrapping L. Doing so reduces code/logic repetition by maintaining a single getModern implementation.
wrapToModern
in class AbstractLegacyAdapter<IRandomAccess,IRandomAccess>
legacy
- - An instance of the legacy class.Copyright © 2014 Open Microscopy Environment