Packagenet.systemeD.halcyon.styleparser
Classpublic class Condition

A single tag test that forms part of a MapCSS selector. For example, "highway==primary" or "population>1000". Conditions are grouped in Rules.

See also

net.systemeD.halcyon.styleparser.Rule


Public Properties
 PropertyDefined by
  params : Array
Condition
  type : String
Condition
Public Methods
 MethodDefined by
  
Condition(type:String = "", ... params)
Create a new Condition.
Condition
  
test(tags:Object):Boolean
Test a tag hash against the Condition.
Condition
  
toString():String
Condition
Property detail
paramsproperty
public var params:Array
typeproperty 
public var type:String
Constructor detail
Condition()constructor
public function Condition(type:String = "", ... params)

Create a new Condition.

Valid types:

eq,'highway','trunk' - simple equality test

ne,'highway','trunk' - not equals

regex,'highway','trunk.+' - regular expression

true,'bridge' - value is true/yes/1

untrue,'bridge' - value is not true/yes/1

set,'highway' - tag exists and is not ''

unset,'highway' - tag does not exist, or is ''

<,'population','5000' - numeric comparison (also <=, >, >=)

Parameters
type:String (default = "")
 
... params
Method detail
test()method
public function test(tags:Object):Boolean

Test a tag hash against the Condition.

Parameters
tags:Object

Returns
Boolean
toString()method 
public function toString():String

Returns
String