Skip to content

Commit

Permalink
Add skeleton object for defining the state of data
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultz committed Nov 5, 2011
1 parent 5766a45 commit 6df5a38
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/mesh/model/store/DataState.as
@@ -0,0 +1,39 @@
package mesh.model.store
{
/**
* The <code>DataState</code> class encapsulates the state of the data for a store key in
* the store, in relation to the data's source.
*
* @author Dan Schultz
*/
public class DataState
{
/**
* Constructor.
*/
public function DataState(value:int)
{
_value = value;
}

/**
* Checks if two states are equal.
*
* @param obj The object to check.
* @return <code>true</code> if the two states are equal.
*/
public function equals(obj:Object):Boolean
{
return obj is DataState ? obj.value == value : false;
}

private var _value:int;
/**
* The internal value for this state.
*/
public function get value():int
{
return _value;
}
}
}

0 comments on commit 6df5a38

Please sign in to comment.