matches method

bool matches(
  1. T candidate
)

Check if this query matches a node.

Implementation

bool matches(T candidate) {
	// for every predicate,
	for (var cond in conditions) {
		// if it does not apply, return false
		if (!cond(candidate)) {
			return false;
		}
	}
	// otherwise, return true
	return true;
}