Module: Core::Utils
- Defined in:
- lib/ruby-band/core/type/utils.rb
Class Method Summary collapse
-
.bidimensional_to_double(ruby_array) ⇒ Object
Convert a bidimensional RubyArray to a java double [][].
- .bidimensional_to_long(ruby_array) ⇒ Object
- .double_to_a(java_array) ⇒ Object
Class Method Details
.bidimensional_to_double(ruby_array) ⇒ Object
Convert a bidimensional RubyArray to a java double [][]
7 8 9 |
# File 'lib/ruby-band/core/type/utils.rb', line 7 def Utils.bidimensional_to_double(ruby_array) ruby_array.to_java Java::double[] end |
.bidimensional_to_long(ruby_array) ⇒ Object
11 12 13 |
# File 'lib/ruby-band/core/type/utils.rb', line 11 def Utils.bidimensional_to_long(ruby_array) ruby_array.to_java Java::long[] end |
.double_to_a(java_array) ⇒ Object
15 16 17 18 19 |
# File 'lib/ruby-band/core/type/utils.rb', line 15 def Utils.double_to_a(java_array) ruby_array = [] java_array.each {|val| ruby_array << val} ruby_array end |