static int toIntOr(O o, int defaultValue) { if (o == null) ret defaultValue; if (o instanceof Number) ret ((Number) o).intValue(); if (o cast S) ret isInteger(o) ? parseInt(o) : defaultValue; ret defaultValue; } static int toIntOr(Int i, int defaultValue) { ret i != null ? i.intValue() : defaultValue; }