I need to turn double into long preserving its binary structure, not number value. Just change type, but leave binary value as it is. Is there a native way to do it?
There is Double with to doubleToLongBits and doubleToLongRawBits. Javadoc is your friend.