+ int offset = 0;
+ if (a[0] instanceof String) {
+ offset = 1;
+ }
+
+ int min = (Integer) a[0 + offset];
+ int max = (Integer) a[1 + offset];
+ int progress = (Integer) a[2 + offset];
+
+ Object meta = null;
+ if (a.length > (3 + offset)) {
+ meta = a[3 + offset];
+ }
+
+ if (min >= 0 && min <= max) {
+ pg.setMinMax(min, max);
+ pg.setProgress(progress);
+ if (meta != null) {
+ pg.put("meta", meta);