How do I convert Double[] to double[]?

后端 未结 8 1752
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 09:04

I\'m implementing an interface that has functionality similar to a table that can contain an types of objects. The interface specifies the following function:



        
8条回答
  •  眼角桃花
    2020-11-28 09:42

    Unfortunately you will need to loop through the entire list and unbox the Double if you want to convert it to a double[].

    As far as performance goes, there is some time associated with boxing and unboxing primitives in Java. If the set is small enough, you won't see any performance issues.

提交回复
热议问题