Sample polishing requested by Andrei and Jesse. In spite I do not agree it is important - but I do not have power to describe that it is not important. Maybe in a blog.
1 package api.request.response;
6 // BEGIN: grow.request.response
7 public interface Compute {
8 public void computeData(Request request, Response response);
10 public final class Request {
11 // only getters public, rest hidden only for friend code
16 public final class Response {
17 // only setters public, rest available only for friend code
18 private final Map<String,String> result;
19 /** Allow access only to friend code */
20 Response(Map<String,String> result) {
24 public void add(String s) {
28 public void addAll(List<String> all) {
29 for (String s : all) {
35 public void add(String s, String description) {
36 result.put(s, description);
40 // END: grow.request.response