@Test public void whenTest() { EventSubprocess element = Bpmn2Factory.eINSTANCE.createEventSubprocess(); Result<BpmnNode> result = match().apply(element); verify(assertSubProcess).apply(element); assertNotEquals(result.value(), defaultValue); assertTrue(result.isSuccess()); }
public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); }
Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } }
Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); }
Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? extends View<? extends Out>, ?>> ofNode(Class<In> inputType, Class<Out> outputType); static Match<Node<? extends View<? extends In>, ?>, Out> fromNode(Class<In> inputType, Class<Out> outputType); static Match<In, Edge<? extends View<? extends Out>, ?>> ofEdge(Class<In> inputType, Class<Out> outputType); Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then); Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then); Match<In, Out> missing(Class<Sub> type); Match<In, Out> ignore(Class<Sub> type); Match<In, Out> ignore(Class<Sub> type, Out outValue); Match<In, Out> orElse(Function<In, Out> then); Match<In, Out> inputDecorator(MarshallingMessageDecorator<In> decorator); Match<In, Out> outputDecorator(MarshallingMessageDecorator<Out> decorator); Match<In, Out> defaultValue(Out value); Match<In, Out> mode(Mode mode); Result<Out> apply(In value); }
Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? extends View<? extends Out>, ?>> ofNode(Class<In> inputType, Class<Out> outputType); static Match<Node<? extends View<? extends In>, ?>, Out> fromNode(Class<In> inputType, Class<Out> outputType); static Match<In, Edge<? extends View<? extends Out>, ?>> ofEdge(Class<In> inputType, Class<Out> outputType); Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then); Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then); Match<In, Out> missing(Class<Sub> type); Match<In, Out> ignore(Class<Sub> type); Match<In, Out> ignore(Class<Sub> type, Out outValue); Match<In, Out> orElse(Function<In, Out> then); Match<In, Out> inputDecorator(MarshallingMessageDecorator<In> decorator); Match<In, Out> outputDecorator(MarshallingMessageDecorator<Out> decorator); Match<In, Out> defaultValue(Out value); Match<In, Out> mode(Mode mode); Result<Out> apply(In value);  }