The Gravy Framework

Class ListModel

Object
   |
   +--OObject
         |
         +--Observer
               |
               +--Model
                     |
                     +--ListModel
Direct Known Subclasses:
DequeModel, BalanceListModel

class ListModel
extends Model


This class encapsulates a data model for a List of objects. This class implements the Collection interface.
Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js

Version: 1.0


Constructor Summary
ListModel ()
           
 
Method Summary
 Object _pop( )
           pop top item off list but dont publish
 Object _push(o)
           push item onto list but dont publish
 void _reset( )
           clear list and update timestamp but dont publish
 void addBefore(i,o)
           add the given object into the list just before the given zero-based-index
 Object addItem(o)
           push given item onto list and publish
 String dump()
           debug method to return this list as a string
 int getCount( )
           return count of items in list
 Object getItem(i)
           return item in list with given index
 String getItemStr(i)
           return item in list with given index as formatted string
 void iterate(<Function> f)
           iterate thru items in list calling specified function
 void konstructor( <String> optName )
          
 void reset( )
           clear list and publish
 
Methods inherited from class Model
dumpSubscribers, toString, dirty, clean, neverChanged, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class Observer
update, subscribe
 

Constructor Detail

ListModel

ListModel()

Method Detail

_pop

Object _pop( )

_push

Object _push(o)

_reset

void _reset( )

addBefore

void addBefore(i,o)

addItem

Object addItem(o)

dump

String dump()

getCount

int getCount( )

getItem

Object getItem(i)

getItemStr

String getItemStr(i)

iterate

void iterate(<Function> f)

konstructor

void konstructor( <String> optName )

reset

void reset( )

The Gravy Framework

Documentation generated by JSDoc on Fri Mar 17 06:40:21 2006