Class fever.app.memento.CareTaker

Description

Manages a Memento instance list.

See Also

Field Index

index

Method Index

new CareTaker()
clear(), get(), getNext(), getOriginator(), getPrevious(), hasNext(), hasPrevious(), push(), redo(), toString(), undo()

Constructor Detail

CareTaker

public function CareTaker(originator:Originator)

Constructor.

Parameters

originator(optional) Originator instance

Field Detail

index

public index:Number [Read Only]
Read-only. Returns cursor's position in memento iteration.

Method Detail

push

public function push(m:Memento):Void

Registers a new Memento state.

Parameters

clear

public function clear():Void

Clears memento list.

get

public function get(index:Number):Memento

Returns fever.app.memento.Memento at index index in caretaler list.

undo

public function undo():Memento

Undo implementation

Returns previous saved state.

redo

public function redo():Memento

Redo implementation

Returns next saved state.

hasNext

public function hasNext():Boolean

Returns true if a next state is available in memento list

hasPrevious

public function hasPrevious():Boolean

Returns true if a previous state is available in memento list

getNext

public function getNext()

Returns the next available memento

getPrevious

public function getPrevious()

Returns the previous available memento

getOriginator

public function getOriginator():Originator

Read-only. Reference to fever.app.memento.Originator instance.

toString

public function toString():String

Returns string representation.