public static boolean isValidTime(String time)
    {
        String[] times = time.split(":");
        for (int i = 0; i < times.length - 1; i++)
            if (!isInteger(times[i]))
                return false;
            if (!isDouble(times[times.length - 1]))
                return false;
        return true;
    }