com.threerings.whirled.util
Class UpdateList

java.lang.Object
  extended by com.threerings.whirled.util.UpdateList

public class UpdateList
extends Object

A list specialized for storing SceneUpdate objects.


Constructor Summary
UpdateList()
           
 
Method Summary
 void addUpdate(SceneUpdate update)
          Adds an update to this list.
 SceneUpdate[] getUpdates(int fromVersion)
          Returns all of the updates that should be applied to a scene with the specified version to bring it up to date.
 boolean validate(int sceneVersion)
          Returns true if the supplied actual scene version is in accordance with the updates contained in this list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateList

public UpdateList()
Method Detail

addUpdate

public void addUpdate(SceneUpdate update)
Adds an update to this list. The update must follow appropriately the chain of updates established by the updates already in the list (meaning it must operate on one version higher than the most recent update already in the list).


getUpdates

public SceneUpdate[] getUpdates(int fromVersion)
Returns all of the updates that should be applied to a scene with the specified version to bring it up to date. null is returned if the scene's version is older than the oldest update in our list, in which case it cannot be brought up to date by applying updates from this list.


validate

public boolean validate(int sceneVersion)
Returns true if the supplied actual scene version is in accordance with the updates contained in this list.



Copyright © 2011. All Rights Reserved.