-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Archinamon/master
Array constructor lambda reference support for Stream:collect method
- Loading branch information
Showing
4 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/annimon/stream/function/IntFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.annimon.stream.function; | ||
|
||
/** | ||
* Represents a function that accepts an int-valued argument and produces a | ||
* result. This is the {@code int}-consuming primitive specialization for | ||
* {@link Function}. | ||
* | ||
* <p>This is a <a href="package-summary.html">functional interface</a> | ||
* whose functional method is {@link #apply(int)}. | ||
* | ||
* @param <R> the type of the result of the function | ||
* | ||
* @see Function | ||
*/ | ||
@FunctionalInterface | ||
public interface IntFunction<R> { | ||
|
||
/** | ||
* Applies this function to the given argument. | ||
* | ||
* @param value the function argument | ||
* @return the function result | ||
*/ | ||
R apply(int value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters