package com.rhomobile.rhodes.api;

import java.util.List;
import java.util.Map;

public interface IMethodResult {
    void set(boolean res);
    void set(int res);
    void set(double res);
    void set(String res);
    void set(List<Object> res);
    void set(Map<String, Object> res);
    
    void collect(Object value);
    void collect(String key, Object value);
    void set();
    
    void setSelf(IMethodResult globalResult);
    void collectSelf(IMethodResult globalResult);
    void collectSelf(String key, IMethodResult globalResult);
    void mergeSelf(IMethodResult result);
    
    void forceBooleanType();
    void forceIntegerType();
    void forceDoubleType();

    void setError(String mesage);
    void setArgError(String message);

    boolean hasCallback();
}

@@ -743,24 +743,378 @@
  message);%0A%0A
+    // hasCallback is used for backward compartability with some API's%0A    // use-cases are:%0A    // - if callback is set then return values on event or timer%0A    // - if callback is not set then just return current values%0A    // in general case it should not be used. there should be%0A    // two different methods for getting values and setting callbacks%0A
     boolean 

add comment about MethodResult.hasCallback usage