/**
* checks current SelectionGroup against record of last hash value, and
* updates record.
+ * @param b update the record of last hash value
*
- * @return true if SelectionGroup changed since last call
+ * @return true if SelectionGroup changed since last call (when b is true)
*/
- boolean isSelectionGroupChanged()
+ boolean isSelectionGroupChanged(boolean b)
{
- int hc = (selectionGroup == null) ? -1 : selectionGroup.hashCode();
- if (hc != sgrouphash)
+ int hc = (selectionGroup == null || selectionGroup.getSize()==0) ? -1 : selectionGroup.hashCode();
+ if (hc!=-1 && hc != sgrouphash)
{
- sgrouphash = hc;
+ if (b) {sgrouphash = hc;}
return true;
}
return false;
}
/**
- * checks current colsel against record of last hash value, and updates
+ * checks current colsel against record of last hash value, and optionally updates
* record.
- *
- * @return true if colsel changed since last call
+
+ * @param b update the record of last hash value
+ * @return true if colsel changed since last call (when b is true)
*/
- boolean isColSelChanged()
+ boolean isColSelChanged(boolean b)
{
- int hc = (colSel == null) ? -1 : colSel.hashCode();
- if (hc != colselhash)
+ int hc = (colSel == null || colSel.size()==0) ? -1 : colSel.hashCode();
+ if (hc!=-1 && hc != colselhash)
{
- colselhash = hc;
+ if (b) {colselhash = hc;}
return true;
}
return false;