You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "remeio (via GitHub)" <gi...@apache.org> on 2023/04/17 12:39:27 UTC

[GitHub] [commons-lang] remeio commented on pull request #1057: Feature add NOP for TriFunction

remeio commented on PR #1057:
URL: https://github.com/apache/commons-lang/pull/1057#issuecomment-1511262424

   I agree the  ` When returning a result, even specifying null is an operation.` But in package `org.apache.commons.lang3.function`, there seems to be some kind of agreement.
   
   - NOP for Function: (t, u) -> null;
   - NOP for Consumer: (t, u) -> {/* NOP */};
   
   Such as For Function:
   ```java
   public interface FailableBiFunction<T, U, R, E extends Throwable> {
   
       /** NOP singleton */
       @SuppressWarnings("rawtypes")
       FailableBiFunction NOP = (t, u) -> null;
   }
   ``` 
   For Consumer: 
   ```java
   @FunctionalInterface
   public interface FailableBiConsumer<T, U, E extends Throwable> {
   
       /** NOP singleton */
       @SuppressWarnings("rawtypes")
       FailableBiConsumer NOP = (t, u) -> {/* NOP */};
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org