boolean (String s) { if (s == null) return false; s = s.trim(); if (s.isEmpty()) return false; int i; try { i = Integer.parseInt(s); } catch (NumberFormatException ex) { return false; } return i > 0; }