Back to project page sony-camera-remote-java.
The source code is released under:
Apache License
If you think the Android project sony-camera-remote-java listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.praetoriandroid.cameraremote.rpc; /*ww w.j a va2s. c o m*/ /** * Simplest form of API response with the only integer value in <code>'result'</code> field. In most cases the value * is 0 and indicates the success status as well as absence of <code>'error'</code> field. */ public class SimpleResponse extends BaseResponse<Integer> { @Override public void validate() throws ValidationException { super.validate(); if (isOk()) { Integer[] result = getResult(); if (result.length != 1) { throw new IllegalResultSizeException(1, result.length); } } } public int getValue() { return getResult()[0]; } }