@Test public void testAddToLeftCombiner() { final Set<String> abc = new HashSet<>(Arrays.asList("a", "b", "c")); final Set<String> oneTwoThree = new HashSet<>(Arrays.asList("1", "2", "3")); final BinaryOperator<Set<String>> operator = ChecklistExporter.addToLeft(); final Set<String> result = operator.apply(abc, oneTwoThree); assertSame("result is same as left", abc, result); final Set<String> expected = new HashSet<>(Arrays.asList("a", "b", "c", "1", "2", "3")); assertEquals("result is expected", expected, result); }
static <E, U extends Collection<E>> BinaryOperator<U> addToLeft() { return (left, right) -> { left.addAll(right); return left; }; }
ChecklistExporter { static <E, U extends Collection<E>> BinaryOperator<U> addToLeft() { return (left, right) -> { left.addAll(right); return left; }; } }
ChecklistExporter { static <E, U extends Collection<E>> BinaryOperator<U> addToLeft() { return (left, right) -> { left.addAll(right); return left; }; } private  ChecklistExporter(final List<Op> operations,
                              final List<String> exportTypeDefs,
                              final List<Rule> pathScopes,
                              final List<Rule> nodeTypeFilters,
                              final List<JcrNs> jcrNamespaces); }
ChecklistExporter { static <E, U extends Collection<E>> BinaryOperator<U> addToLeft() { return (left, right) -> { left.addAll(right); return left; }; } private  ChecklistExporter(final List<Op> operations,
                              final List<String> exportTypeDefs,
                              final List<Rule> pathScopes,
                              final List<Rule> nodeTypeFilters,
                              final List<JcrNs> jcrNamespaces); void updateChecklist(final WriterOpener writerOpener,
                                final Session session,
                                final Checklist checklist,
                                final ForcedRootUpdatePolicy updatePolicy); List<ForcedRoot> findRoots(final Session session); }
ChecklistExporter { static <E, U extends Collection<E>> BinaryOperator<U> addToLeft() { return (left, right) -> { left.addAll(right); return left; }; } private  ChecklistExporter(final List<Op> operations,
                              final List<String> exportTypeDefs,
                              final List<Rule> pathScopes,
                              final List<Rule> nodeTypeFilters,
                              final List<JcrNs> jcrNamespaces); void updateChecklist(final WriterOpener writerOpener,
                                final Session session,
                                final Checklist checklist,
                                final ForcedRootUpdatePolicy updatePolicy); List<ForcedRoot> findRoots(final Session session); static final ForcedRootUpdatePolicy DEFAULT_UPDATE_POLICY; static final String COVARIANT_PREFIX; }