diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/IceGridGUI/Application/Editable.java | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/IceGridGUI/Application/Editable.java')
-rw-r--r-- | java/src/IceGridGUI/Application/Editable.java | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/java/src/IceGridGUI/Application/Editable.java b/java/src/IceGridGUI/Application/Editable.java deleted file mode 100644 index f6cd02d3b52..00000000000 --- a/java/src/IceGridGUI/Application/Editable.java +++ /dev/null @@ -1,107 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package IceGridGUI.Application; - -class Editable implements Cloneable -{ - Editable(boolean brandNew) - { - _isNew = brandNew; - } - - boolean isNew() - { - return _isNew; - } - - boolean isModified() - { - return _modified; - } - - void markModified() - { - _modified = true; - } - - void commit() - { - _isNew = false; - _modified = false; - _removedElements.clear(); - } - - void markNew() - { - _isNew = true; - } - - void removeElement(String id, Editable editable, Class forClass) - { - if(!editable.isNew()) - { - java.util.TreeSet<String> set = _removedElements.get(forClass); - if(set == null) - { - set = new java.util.TreeSet<String>(); - _removedElements.put(forClass, set); - } - set.add(id); - } - } - - String[] removedElements(Class forClass) - { - java.util.TreeSet<String> set = _removedElements.get(forClass); - if(set == null) - { - return new String[0]; - } - else - { - return set.toArray(new String[0]); - } - } - - Editable save() - { - try - { - Editable result = (Editable)clone(); - java.util.HashMap<Class, java.util.TreeSet<String>> removedElements = - new java.util.HashMap<Class, java.util.TreeSet<String>>(); - for(java.util.Map.Entry<Class, java.util.TreeSet<String>> p : result._removedElements.entrySet()) - { - java.util.TreeSet<String> val = new java.util.TreeSet<String>(p.getValue()); - removedElements.put(p.getKey(), val); - } - result._removedElements = removedElements; - return result; - } - catch(CloneNotSupportedException e) - { - assert false; - return null; - } - } - - void restore(Editable clone) - { - _isNew = clone._isNew; - _modified = clone._modified; - _removedElements = clone._removedElements; - } - - private boolean _isNew = false; - private boolean _modified = false; - - private java.util.HashMap<Class, java.util.TreeSet<String>> _removedElements = - new java.util.HashMap<Class, java.util.TreeSet<String>>(); -} |