mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 21:23:10 +08:00
improve java api doc (#2508)
This commit is contained in:
committed by
Robert Nishihara
parent
3f3514c2b3
commit
fe65f9fbbc
@@ -18,8 +18,8 @@ public class Exercise08 {
|
||||
RayActor<Adder> adder = Ray.create(Adder.class);
|
||||
// Use `Ray.call(actor, parameters)` to call an actor method.
|
||||
RayObject<Integer> result1 = Ray.call(Adder::add, adder, 1);
|
||||
RayObject<Integer> result2 = Ray.call(Adder::add, adder, 10);
|
||||
System.out.println(result1.get());
|
||||
RayObject<Integer> result2 = Ray.call(Adder::add, adder, 10);
|
||||
System.out.println(result2.get());
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
@@ -39,10 +39,10 @@ public class Exercise08 {
|
||||
sum = 0;
|
||||
}
|
||||
|
||||
public Integer add(Integer n) {
|
||||
public int add(int n) {
|
||||
return sum += n;
|
||||
}
|
||||
|
||||
private Integer sum;
|
||||
private int sum;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user