This repository has been archived on 2022-12-21. You can view files and clone it, but cannot push or open issues or pull requests.
sdm03/src/main/java/com/github/dtschust/zork/parser/TriggerPropertyParseStrateg...

20 lines
654 B
Java

package com.github.dtschust.zork.parser;
import com.github.dtschust.zork.ZorkTrigger;
import java.util.function.Function;
public interface TriggerPropertyParseStrategy {
ZorkTrigger parseTrigger(final Property source, final Property parent);
/**
* Partial function application for the parseTrigger method able to define the parent element first
*
* @param parent the parent element
* @return a lambda mapping a source, a child element of `parent`, to ZorkTrigger objects
*/
default Function<Property, ZorkTrigger> parse(final Property parent) {
return source -> this.parseTrigger(source, parent);
}
}