Here you can find the source of doubleToBoolean(double[] values)
public static boolean[] doubleToBoolean(double[] values)
//package com.java2s; public class Main { public static boolean[] doubleToBoolean(double[] values) { if (values == null) { return null; }//from www .j a va 2 s . c o m boolean[] results = new boolean[values.length]; for (int i = 0; i < values.length; i++) { results[i] = (values[i] != 0); } return results; } }