private int countLayerPropertiesModified() { int count = 0; System.out.println("Memento Counting: "); System.out.println("Memento Counting: " + this.modifiedLayersMap.values()); for (AbstractMementoOriginalProperties memento : this.modifiedLayersMap.values()) { System.out.println("Memento changed: " + memento.isChanged()); if (memento.isChanged()) { count++; } } return count; }
private void prepareLayerPropertiesModified() { for (AbstractMementoOriginalProperties memento : this.modifiedLayersMap.values()) { if (memento.isChanged()) { this.add(memento); } } this.modifiedLayersMap.clear(); }