Packagecom.degrafa.core.collections
Classpublic class DegrafaCursor
SubclassesCommandCursor

The DegrafaCursor is a class that aids enumeration and modification of the enclosed Array.



Public Properties
 PropertyDefined by
  afterLast : Boolean
[read-only] Checks whether or not the cursor is after the last item.
DegrafaCursor
  beforeFirst : Boolean
[read-only] Checks whether or not the cursor is before the first item.
DegrafaCursor
  current : *
[read-only] Returns the Object at the currentIndex.
DegrafaCursor
  currentIndex : int
The value representing the current location of the cursor.
DegrafaCursor
  nextObject : *
[read-only] Gets the Object after the currentIndex
DegrafaCursor
  previousObject : *
[read-only] Gets the Object before the currentIndex
DegrafaCursor
  source : Array
DegrafaCursor
Public Methods
 MethodDefined by
  
DegrafaCursor(source:Array)
DegrafaCursor
  
insert(value:*):void
Inserts a Object into the array at the currentIndex.
DegrafaCursor
  
moveFirst():void
Moves cursor to the front.
DegrafaCursor
  
moveLast():void
Moves cursor to the end.
DegrafaCursor
  
moveNext():Boolean
Moves the cursor up one item in the currentIndex unless it is at the end.
DegrafaCursor
  
movePrevious():Boolean
Moves the cursor down one item in the currentIndex unless it is at the beginning.
DegrafaCursor
  
remove():*
Removes a Object from the array at the currentIndex.
DegrafaCursor
  
seek(bookmark:CursorBookmark, offset:int = 0):void
Moves the currentIndex using the bookmark and offset.
DegrafaCursor
Protected Constants
 ConstantDefined by
  AFTER_LAST_INDEX : int = -2
[static]
DegrafaCursor
  BEFORE_FIRST_INDEX : int = -1
[static]
DegrafaCursor
Property detail
afterLastproperty
afterLast:Boolean  [read-only]

Checks whether or not the cursor is after the last item.

Implementation
    public function get afterLast():Boolean
beforeFirstproperty 
beforeFirst:Boolean  [read-only]

Checks whether or not the cursor is before the first item.

Implementation
    public function get beforeFirst():Boolean
currentproperty 
current:*  [read-only]

Returns the Object at the currentIndex. If the currentIndex is before the first index, a null value is returned;

Implementation
    public function get current():*
currentIndexproperty 
public var currentIndex:int

The value representing the current location of the cursor.

nextObjectproperty 
nextObject:*  [read-only]

Gets the Object after the currentIndex

Implementation
    public function get nextObject():*
previousObjectproperty 
previousObject:*  [read-only]

Gets the Object before the currentIndex

Implementation
    public function get previousObject():*
sourceproperty 
public var source:Array
Constructor detail
DegrafaCursor()constructor
public function DegrafaCursor(source:Array)

Parameters
source:Array — A reference to the enclosed Array.
Method detail
insert()method
public function insert(value:*):void

Inserts a Object into the array at the currentIndex.

Parameters
value:* — The Object to be inserted into the array.
moveFirst()method 
public function moveFirst():void

Moves cursor to the front.

moveLast()method 
public function moveLast():void

Moves cursor to the end.

moveNext()method 
public function moveNext():Boolean

Moves the cursor up one item in the currentIndex unless it is at the end.

Returns
Boolean — Boolean value of whether or not the cursor is at the end of the array.
movePrevious()method 
public function movePrevious():Boolean

Moves the cursor down one item in the currentIndex unless it is at the beginning.

Returns
Boolean — Boolean value of whether or not the cursor is at the beginning of the array.
remove()method 
public function remove():*

Removes a Object from the array at the currentIndex.

Returns
* — The Object removed from the array.
seek()method 
public function seek(bookmark:CursorBookmark, offset:int = 0):void

Moves the currentIndex using the bookmark and offset.

Parameters
bookmark:CursorBookmark — CursorBookmark used to assist the seek. The enumeration values are FIRST, CURRENT, LAST.
 
offset:int (default = 0) — Number of places away from the bookmark the currentIndex should be moved.
Constant detail
AFTER_LAST_INDEXconstant
protected static const AFTER_LAST_INDEX:int = -2
BEFORE_FIRST_INDEXconstant 
protected static const BEFORE_FIRST_INDEX:int = -1