1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/growingparameters/src-api1.0/api/request/response/Compute.java Sat Jun 14 09:53:38 2008 +0200
1.3 @@ -0,0 +1,31 @@
1.4 +package api.request.response;
1.5 +
1.6 +import java.util.List;
1.7 +
1.8 +public interface Compute {
1.9 + public void computeData(Request request, Response response);
1.10 +
1.11 + /** Right now useless, but may be handy in future */
1.12 + public final class Request {
1.13 + /** allow access just from friend code */
1.14 + Request() {
1.15 + }
1.16 + }
1.17 +
1.18 + /** Allows clients to provide the computed strings */
1.19 + public final class Response {
1.20 + private final List<String> result;
1.21 + /** Allow access only to friend code */
1.22 + Response(List<String> result) {
1.23 + this.result = result;
1.24 + }
1.25 +
1.26 + public void add(String s) {
1.27 + this.result.add(s);
1.28 + }
1.29 +
1.30 + public void addAll(List<String> all) {
1.31 + this.result.addAll(all);
1.32 + }
1.33 + }
1.34 +}