org.openstreetmap.osmosis.core.container.v0_6
Class BoundContainer

java.lang.Object
  extended by org.openstreetmap.osmosis.core.container.v0_6.EntityContainer
      extended by org.openstreetmap.osmosis.core.container.v0_6.BoundContainer
All Implemented Interfaces:
Storeable

public class BoundContainer
extends EntityContainer

Entity container implementation for bound.

Author:
knewman

Constructor Summary
BoundContainer(Bound bound)
          Creates a new instance.
BoundContainer(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 Bound getEntity()
          Returns the contained entity.
 BoundContainer getWriteableInstance()
          Returns an instance containing a writeable entity.
 void process(EntityProcessor processor)
          Calls the appropriate process method with the contained entity.
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundContainer

public BoundContainer(Bound bound)
Creates a new instance.

Parameters:
bound - The bound to wrap.

BoundContainer

public BoundContainer(StoreReader sr,
                      StoreClassRegister scr)
Creates a new instance.

Parameters:
sr - The store to read state from.
scr - Maintains the mapping between classes and their identifiers within the store.
Method Detail

store

public void store(StoreWriter sw,
                  StoreClassRegister scr)
Stores all state to the specified store writer.

Parameters:
sw - The writer that persists data to an underlying store.
scr - Maintains the mapping between classes and their identifiers within the store.

process

public void process(EntityProcessor processor)
Calls the appropriate process method with the contained entity.

Specified by:
process in class EntityContainer
Parameters:
processor - The processor to invoke.

getEntity

public Bound getEntity()
Returns the contained entity.

Specified by:
getEntity in class EntityContainer
Returns:
The entity.

getWriteableInstance

public BoundContainer getWriteableInstance()
Returns an instance containing a writeable entity. If the entity within this instance is already writeable then "this" will be returned, otherwise a cloned entity and container will be created.

Specified by:
getWriteableInstance in class EntityContainer
Returns:
A container holding a writeable entity.