static int toIntOrMinus1(O o) { if (o == null) ret -1; if (o instanceof Number) ret ((Number) o).intValue(); if (o cast S) ret isInteger(o) ? parseInt(o) : -1; ret -1; }