SyntaxFix
Write A Post
Hire A Developer
Questions
Short and sweet.
Using Java 8 you can do following :
Map<Key, Value> result= results .stream() .collect(Collectors.toMap(Value::getName,Function.identity()));
Value can be any object you use.
Value