Created
June 14, 2016 20:31
-
-
Save rjeli/f019c4fcbc7bf02c250959a494d592ac to your computer and use it in GitHub Desktop.
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
package com.eli.testproject; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class Test { | |
public static void main(String[] args) { | |
List<Integer> nums = new ArrayList<>(); | |
List<Box<Integer>> featurizedStream = nums | |
.stream() | |
.map(x -> new Box(x)) | |
.collect(Collectors.toList()); | |
} | |
private static class Box<T> { | |
Box(T item) {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment