Packageorg.omoa.spacemodel.iterator
Classpublic class AttributeCompareIterator
InheritanceAttributeCompareIterator Inheritance AbstractIterator Inheritance Object

Compares two attributes (from the attributes array) of a SpaceModelEntity and iterates only over the entities where the attributes match the comparison (compare evaluates to "true"). If you want to compare an attribute against a fixed value use the AttributeFilterIterator.

See also

AttributeFilterIterator


Protected Properties
 PropertyDefined By
 Inherited_entities : Vector.<SpaceModelEntity>
AbstractIterator
Public Methods
 MethodDefined By
  
AttributeCompareIterator
  
count():int
[override]
AttributeCompareIterator
  
hasNext():Boolean
[override]
AttributeCompareIterator
  
init(firstAttributeKey:String, compareFunction:int, secondAttributeKey:String):void
Compares the value of firstAttributeKey against the value of secondAttributeKey using the compareFunction.
AttributeCompareIterator
 Inherited
iterator(type:String = null):ISpaceModelIterator
Creates a new ISpaceModelIterator of the given type.
AbstractIterator
  
[override]
AttributeCompareIterator
  
reset():void
[override]
AttributeCompareIterator
 Inherited
type():String
AbstractIterator
Public Constants
 ConstantDefined By
  EQUALS : int = 0
AttributeCompareIterator
  GREATER : int = 1
AttributeCompareIterator
  SMALLER : int = 2
AttributeCompareIterator
Constructor Detail
AttributeCompareIterator()Constructor
public function AttributeCompareIterator(entities:Vector.<SpaceModelEntity>)



Parameters
entities:Vector.<SpaceModelEntity>
Method Detail
count()method
override public function count():int

Returns
int
hasNext()method 
override public function hasNext():Boolean

Returns
Boolean
init()method 
public function init(firstAttributeKey:String, compareFunction:int, secondAttributeKey:String):void

Compares the value of firstAttributeKey against the value of secondAttributeKey using the compareFunction.

Parameters

firstAttributeKey:String — The attribute name of the first attribute.
 
compareFunction:int — The compare operator EQUALS, GREATER or SMALLER.
 
secondAttributeKey:String — The attribute name of the second attribute.

next()method 
override public function next():SpaceModelEntity

Returns
SpaceModelEntity
reset()method 
override public function reset():void

Constant Detail
EQUALSConstant
public const EQUALS:int = 0

GREATERConstant 
public const GREATER:int = 1

SMALLERConstant 
public const SMALLER:int = 2