+ progress = Math.max(min, progress);
+ progress = Math.min(max, progress);
+
+ if (progress != this.progress) {
+ this.progress = progress;
+ changed(pg);
+ }
+ }
+ }
+
+ /**
+ * Notify the listeners that this {@link Progress} changed value.
+ *
+ * @param pg
+ * the emmiter
+ */
+ private void changed(Progress pg) {
+ if (pg == null) {
+ pg = this;
+ }