- type
- class
OptionType representing matching behaviour for Listeners.
An object's set of CbType's 'matches' against an OptionType iff. the OptionType's includes list intersects the object's set of CbTypes and the OptionType's excludes list 'does not' intersect the object's set of CbTypes.
An object's set of CbType's 'matches' against an OptionType iff. the OptionType's includes list intersects the object's set of CbTypes and the OptionType's excludes list 'does not' intersect the object's set of CbTypes.
option = new OptionType([A, B], [C, D]); obj.cbTypes = [] // => does not match option. obj.cbTypes = [A] // => matches the option obj.cbTypes = [A, C] // => does not match option.The optionType's includes and excludes list are managed to be always disjoint: The action of including an already excluded type serves to remove it from the excludes list, equalliy excluding an already included type serves to remove it from the includes list.
var option = new OptionType(); option.including(A); // option = {[A]:[]} option.excluding(A); // option = {[]:[]} option.excluding(A); // option = {[]:[A]} option.including(A); // option = {[A]:[]}