Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for usingFirstArgument (0.15 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/BiActions.java

                    for (BiAction<? super A, ? super B> action : actions) {
                        action.execute(a, b);
                    }
                }
            };
        }
    
        public static <A> BiAction<A, Object> usingFirstArgument(final Action<? super A> action) {
            return new BiAction<A, Object>() {
                @Override
                public void execute(A a, Object o) {
                    action.execute(a);
                }
            };
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/BiActionsTest.groovy

        def "can wrap an action into a bi action that ignores second argument"() {
            given:
            Action<List<String>> action = {a -> a << "added by action" }
            BiAction<List<String>, Object> biAction = BiActions.usingFirstArgument(action)
            def argument = []
    
            when:
            biAction.execute(argument, null)
    
            then:
            argument == ["added by action"]
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top