@Test public void floorTest() { assertEquals("5", GeoWidgetUtils.floor("5")); assertEquals("-5", GeoWidgetUtils.floor("-5")); assertEquals("5", GeoWidgetUtils.floor("5.55")); assertEquals("-5", GeoWidgetUtils.floor("-5.55")); assertEquals("", GeoWidgetUtils.floor("")); assertEquals("", GeoWidgetUtils.floor(null)); assertEquals("qwerty", GeoWidgetUtils.floor("qwerty")); }
static String floor(String value) { if (value == null || value.isEmpty()) { return ""; } return value.contains(".") ? value.substring(0, value.indexOf('.')) : value; }
GeoWidgetUtils { static String floor(String value) { if (value == null || value.isEmpty()) { return ""; } return value.contains(".") ? value.substring(0, value.indexOf('.')) : value; } }
GeoWidgetUtils { static String floor(String value) { if (value == null || value.isEmpty()) { return ""; } return value.contains(".") ? value.substring(0, value.indexOf('.')) : value; } private  GeoWidgetUtils(); }
GeoWidgetUtils { static String floor(String value) { if (value == null || value.isEmpty()) { return ""; } return value.contains(".") ? value.substring(0, value.indexOf('.')) : value; } private  GeoWidgetUtils(); static String convertCoordinatesIntoDegreeFormat(Context context, double coordinate, String type); static double[] getLocationParamsFromStringAnswer(String answer); static String truncateDouble(String s); }
GeoWidgetUtils { static String floor(String value) { if (value == null || value.isEmpty()) { return ""; } return value.contains(".") ? value.substring(0, value.indexOf('.')) : value; } private  GeoWidgetUtils(); static String convertCoordinatesIntoDegreeFormat(Context context, double coordinate, String type); static double[] getLocationParamsFromStringAnswer(String answer); static String truncateDouble(String s);  }