[java] How to convert Double to int directly?