org.openstreetmap.osmosis.core.container.v0_5
Class ChangeContainer

java.lang.Object
  extended by org.openstreetmap.osmosis.core.container.v0_5.ChangeContainer
All Implemented Interfaces:
Storeable

public class ChangeContainer
extends java.lang.Object
implements Storeable

Holds an EntityContainer and an associated action.

Author:
Brett Henderson

Constructor Summary
ChangeContainer(EntityContainer entityContainer, ChangeAction action)
          Creates a new instance.
ChangeContainer(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 ChangeAction getAction()
          Returns the contained action.
 EntityContainer getEntityContainer()
          Returns 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

ChangeContainer

public ChangeContainer(EntityContainer entityContainer,
                       ChangeAction action)
Creates a new instance.

Parameters:
entityContainer - The entity to store.
action - The action to store.

ChangeContainer

public ChangeContainer(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.

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

getEntityContainer

public EntityContainer getEntityContainer()
Returns the contained entity.

Returns:
The entity.

getAction

public ChangeAction getAction()
Returns the contained action.

Returns:
The action.