Does anybody know an efficient, quick and clean way to convert Long[]
to long[]
and vice versa in Java outside the obvious for-loop with (un)box©?
Note: This is not about unboxing Long
or boxing long
. I am explicitly talking about arrays!
"There is no better way than loop and copy" would also be an answer ;)
EDIT: I am aware of the implications of doing the above and that it is better to avoid it. Just assume, I cannot avoid it and want to do it as smartly as possible without using 3rd party stuff.