hellojava 0.0.5-java → 0.0.6-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/ext/hellojava/JavaCallTest.java +17 -0
- data/lib/hellojava.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5668ed427d305237b799d237e5dc1aeed86a5d2d3318a71633335a3af089d109
|
4
|
+
data.tar.gz: 96620876446e11e91acc7ce9add1670b3fecfa043e22e805cfd60dfda8f669ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1323a062b9e32b82a1e2d14d657d871155b216e7748160fac7f10f2a731e681f2236d7d08a56d82c93d5b056b1d02f63bbcfa995723ec56992e4d3b88af10d6
|
7
|
+
data.tar.gz: d2b51606eb40e47f3ba9db14b581b9bf1184860bb93dd78462f6eb18795510400d86b2f7d8c29d41c2052c3711da280806e6be6df948874dbb7e15fcb4110cc8
|
data/CHANGELOG.md
CHANGED
@@ -29,5 +29,22 @@ public class JavaCallTest {
|
|
29
29
|
System.out.println();
|
30
30
|
}
|
31
31
|
}
|
32
|
+
public static IntervalEstim[] strut() {
|
33
|
+
IntervalEstim[] ret = new IntervalEstim[2];
|
34
|
+
|
35
|
+
ret[0] = new IntervalEstim(2.0, 3.0);
|
36
|
+
ret[1] = new IntervalEstim(3.0, 4.0);
|
37
|
+
return ret;
|
38
|
+
}
|
39
|
+
public static class IntervalEstim {
|
40
|
+
private double min;
|
41
|
+
private double max;
|
42
|
+
public IntervalEstim(double min, double max) {
|
43
|
+
this.min = min;
|
44
|
+
this.max = max;
|
45
|
+
}
|
46
|
+
public double getMin() { return this.min; }
|
47
|
+
public double getMax() { return this.max; }
|
48
|
+
}
|
32
49
|
}
|
33
50
|
|
data/lib/hellojava.rb
CHANGED
@@ -87,6 +87,29 @@ module HelloJavaLib
|
|
87
87
|
}
|
88
88
|
JavaCallTest.hash(o)
|
89
89
|
end
|
90
|
+
# 戻り値がハッシュの配列の場合
|
91
|
+
#
|
92
|
+
# @overload func_s()
|
93
|
+
# @return [void]
|
94
|
+
# @example
|
95
|
+
# HelloJavaLib::func_s()
|
96
|
+
# =>
|
97
|
+
# [{:min=>2.0, :max=>3.0}, {:min=>3.0, :max=>4.0}]
|
98
|
+
def func_s()
|
99
|
+
retRb = []
|
100
|
+
retJava = JavaCallTest.strut()
|
101
|
+
sz = retJava.size
|
102
|
+
sz.times do |i|
|
103
|
+
retRb.push(
|
104
|
+
{
|
105
|
+
"min": retJava[i].getMin(),
|
106
|
+
"max": retJava[i].getMax()
|
107
|
+
}
|
108
|
+
)
|
109
|
+
end
|
110
|
+
p retRb
|
111
|
+
return
|
112
|
+
end
|
90
113
|
# 引数に関数型の場合
|
91
114
|
class FuncTypes
|
92
115
|
class << self
|
@@ -144,5 +167,6 @@ module HelloJavaLib
|
|
144
167
|
module_function :func_c
|
145
168
|
module_function :func_v
|
146
169
|
module_function :func_h
|
170
|
+
module_function :func_s
|
147
171
|
end
|
148
172
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellojava
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- siranovel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|