Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class MVCMap

    Object
       |
       +--GrvObject
             |
             +--MVCMap

class MVCMap
extends GrvObject

This class encapsulates a Map of object/key pairs and implements the MVCCollection interface
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in grvMVC.js

Constructor Summary
`MVCMap ()`

Method Summary
`void` | `addItem(k,o)` add given object and associate with given key
`Map` | `clone()` return a (deep) clone of "this" object.
`void` | `delItem( k )` delete item associated with given key
`String` | `dump()` debug method to return this list as a string
`Object` | `first()` return the first object in this map or null if empty
`Object` | `firstKey()` return the first key in this map or null if empty
`int` | `getCount( )` return how many items are in map
`Object` | `getItem( k )` return item associated with given key
`String` | `getItemStr( k )` return item as string associated with given key
`Object` | `getMemento()` return a memento of the current state of "this"
`void` | `iterate( <Function> f )` iterate thru items in map calling specified function
`void` | `konstructor( <String> optName )`
`Object` | `next( k )` Return the object that comes AFTER the given key or, if no key specified, return the first object.
`Object` | `nextKey( k )` Return the key that comes after the given key.
`void` | `reset( )` reset map to empty
`void` | `setMemento(<Object> m)` update "this" based on the given memento

Methods inherited from class GrvObject
`souper`

Constructor Detail

### MVCMap

    MVCMap()

Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Method Detail

### addItem

    void addItem(k,o)

add given object and associate with given key

### clone

    Map clone()

return a (deep) clone of "this" object.

### delItem

    void delItem( k )

delete item associated with given key

### dump

    String dump()

debug method to return this list as a string

### first

    Object first()

return the first object in this map or null if empty

### firstKey

    Object firstKey()

return the first key in this map or null if empty

### getCount

    int getCount( )

return how many items are in map

### getItem

    Object getItem( k )

return item associated with given key

### getItemStr

    String getItemStr( k )

return item as string associated with given key

### getMemento

    Object getMemento()

return a memento of the current state of "this"

### iterate

    void iterate( <Function> f )

iterate thru items in map calling specified function

Parameters:

`f` - function that takes key and object as params and returns true if the iteration should be stopped before all items in map are processed.

### konstructor

    void konstructor( <String> optName )

Parameters:

`optName` - optional name of this instance

### next

    Object next( k )

Return the object that comes AFTER the given key or, if no key specified, return the first object. If no object fits the specs above, return null.

### nextKey

    Object nextKey( k )

Return the key that comes after the given key. If no key is specified, return the first key. If no key matches the specs above, return null.

### reset

    void reset( )

reset map to empty

### setMemento

    void setMemento(<Object> m)

update "this" based on the given memento

Parameters:

`m` - the memento

Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Jan 6 12:46:18 2011