public void registerRules(final BatchTransformationRuleGroup rules) {
try {
Iterable<BatchTransformationRule<?, ?>> _filterNull = IterableExtensions.<BatchTransformationRule<?, ?>>filterNull(rules);
final Function1<BatchTransformationRule<?, ?>, IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> _function = new Function1<BatchTransformationRule<?, ?>, IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>>() {
@Override
public IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> apply(final BatchTransformationRule<?, ?> it) {
return it.getPrecondition();
}
};
final Iterable<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> notNullPreconditions = IterableExtensions.<BatchTransformationRule<?, ?>, IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>>map(_filterNull, _function);
HashSet<IQuerySpecification<?>> _newHashSet = Sets.<IQuerySpecification<?>>newHashSet(notNullPreconditions);
IQueryGroup _of = GenericPatternGroup.of(_newHashSet);
_of.prepare(this.iqEngine);
Iterable<BatchTransformationRule<?, ?>> _filterNull_1 = IterableExtensions.<BatchTransformationRule<?, ?>>filterNull(rules);
final Procedure1<BatchTransformationRule<?, ?>> _function_1 = new Procedure1<BatchTransformationRule<?, ?>>() {
@Override
public void apply(final BatchTransformationRule<?, ?> it) {
RuleSpecification<? extends IPatternMatch> _ruleSpecification = it.getRuleSpecification();
EventFilter<?> _filter = it.getFilter();
BatchTransformationStatements.this.ruleEngine.addRule(_ruleSpecification, ((EventFilter<IPatternMatch>) _filter));
}
};
IterableExtensions.<BatchTransformationRule<?, ?>>forEach(_filterNull_1, _function_1);
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}