]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/java/JavaMap.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / accessor / java / JavaMap.java
index bc1fedabbe3148c5d0f49f0265ed561b7c834df1..ebfe4052cf78e7817221dd8d0f94457f0010349c 100644 (file)
@@ -1,50 +1,50 @@
-/*******************************************************************************\r
- *  Copyright (c) 2010 Association for Decentralized Information Management in\r
- *  Industry THTH ry.\r
- *  All rights reserved. This program and the accompanying materials\r
- *  are made available under the terms of the Eclipse Public License v1.0\r
- *  which accompanies this distribution, and is available at\r
- *  http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- *  Contributors:\r
- *      VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
+/*******************************************************************************
+ *  Copyright (c) 2010 Association for Decentralized Information Management in
+ *  Industry THTH ry.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
 package org.simantics.databoard.accessor.java;
 
-import java.lang.ref.SoftReference;\r
-import java.util.Map;\r
-import java.util.Map.Entry;\r
-import java.util.Set;\r
-import java.util.TreeMap;\r
-import java.util.TreeSet;\r
-import java.util.concurrent.Executor;\r
-\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.accessor.Accessor;\r
-import org.simantics.databoard.accessor.MapAccessor;\r
-import org.simantics.databoard.accessor.error.AccessorConstructionException;\r
-import org.simantics.databoard.accessor.error.AccessorException;\r
-import org.simantics.databoard.accessor.error.ReferenceException;\r
-import org.simantics.databoard.accessor.event.Event;\r
-import org.simantics.databoard.accessor.event.MapEntryAdded;\r
-import org.simantics.databoard.accessor.event.MapEntryRemoved;\r
-import org.simantics.databoard.accessor.event.ValueAssigned;\r
-import org.simantics.databoard.accessor.impl.AccessorParams;\r
-import org.simantics.databoard.accessor.impl.ListenerEntry;\r
-import org.simantics.databoard.accessor.interestset.InterestSet;\r
-import org.simantics.databoard.accessor.interestset.MapInterestSet;\r
-import org.simantics.databoard.accessor.reference.ChildReference;\r
-import org.simantics.databoard.accessor.reference.KeyReference;\r
-import org.simantics.databoard.accessor.reference.LabelReference;\r
-import org.simantics.databoard.adapter.AdaptException;\r
-import org.simantics.databoard.adapter.Adapter;\r
-import org.simantics.databoard.adapter.AdapterConstructionException;\r
-import org.simantics.databoard.binding.ArrayBinding;\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.databoard.binding.MapBinding;\r
-import org.simantics.databoard.binding.error.BindingException;\r
-import org.simantics.databoard.binding.mutable.MutableVariant;\r
-import org.simantics.databoard.type.MapType;\r
+import java.lang.ref.SoftReference;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.concurrent.Executor;
+
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.accessor.Accessor;
+import org.simantics.databoard.accessor.MapAccessor;
+import org.simantics.databoard.accessor.error.AccessorConstructionException;
+import org.simantics.databoard.accessor.error.AccessorException;
+import org.simantics.databoard.accessor.error.ReferenceException;
+import org.simantics.databoard.accessor.event.Event;
+import org.simantics.databoard.accessor.event.MapEntryAdded;
+import org.simantics.databoard.accessor.event.MapEntryRemoved;
+import org.simantics.databoard.accessor.event.ValueAssigned;
+import org.simantics.databoard.accessor.impl.AccessorParams;
+import org.simantics.databoard.accessor.impl.ListenerEntry;
+import org.simantics.databoard.accessor.interestset.InterestSet;
+import org.simantics.databoard.accessor.interestset.MapInterestSet;
+import org.simantics.databoard.accessor.reference.ChildReference;
+import org.simantics.databoard.accessor.reference.KeyReference;
+import org.simantics.databoard.accessor.reference.LabelReference;
+import org.simantics.databoard.adapter.AdaptException;
+import org.simantics.databoard.adapter.Adapter;
+import org.simantics.databoard.adapter.AdapterConstructionException;
+import org.simantics.databoard.binding.ArrayBinding;
+import org.simantics.databoard.binding.Binding;
+import org.simantics.databoard.binding.MapBinding;
+import org.simantics.databoard.binding.error.BindingException;
+import org.simantics.databoard.binding.mutable.MutableVariant;
+import org.simantics.databoard.type.MapType;
 
 public class JavaMap extends JavaObject implements MapAccessor {
 
@@ -75,7 +75,7 @@ public class JavaMap extends JavaObject implements MapAccessor {
        }
 
        @Override
-       public void clear() throws AccessorException {\r
+       public void clear() throws AccessorException {
                writeLock();
                try {
                        if (getBinding().size(object)==0) return;
@@ -112,8 +112,8 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        
                } catch (BindingException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
        }
 
@@ -123,7 +123,7 @@ public class JavaMap extends JavaObject implements MapAccessor {
         * @param localKey
         * @throws AccessorException
         */
-       void removeLocal(Object lk) throws AccessorException {\r
+       void removeLocal(Object lk) throws AccessorException {
                writeLock();
                try {
                        boolean hadValue = getBinding().containsKey(object, lk); 
@@ -157,12 +157,12 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        
                } catch (BindingException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
        }
        
-       void putLocal(Object lk, Object lv) throws AccessorException {\r
+       void putLocal(Object lk, Object lv) throws AccessorException {
                writeLock();
                try {
                        JavaObject sa = getExistingAccessor(lk);                                
@@ -221,14 +221,14 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException( e );
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
        }
        
        @Override
        public void put(Binding keyBinding, Object key, Binding valueBinding,
-                       Object value) throws AccessorException {\r
+                       Object value) throws AccessorException {
                writeLock();
                try {
                        Object rk = key;
@@ -243,15 +243,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (AdaptException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
                
        }
 
        @Override
        public void putAll(Binding keyBinding, Binding valueBinding, Map<Object, Object> from)
-                       throws AccessorException {\r
+                       throws AccessorException {
                writeLock();
                try {
                        // Convert keys and values
@@ -269,13 +269,13 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException( e );
                } catch (AdapterConstructionException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
        }
                
        @Override
-       public void putAll(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException {\r
+       public void putAll(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException {
                writeLock();
                try {
                        // Convert keys and values
@@ -295,8 +295,8 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException( e );
                } catch (AdapterConstructionException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
        }
 
@@ -308,8 +308,8 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        removeLocal(lk);
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
                }
        }
 
@@ -349,7 +349,7 @@ public class JavaMap extends JavaObject implements MapAccessor {
         * @param values
         * @throws AccessorException 
         */
-       void setValueLocal(Object keys[], Object values[]) throws AccessorException {\r
+       void setValueLocal(Object keys[], Object values[]) throws AccessorException {
                writeLock();
                try {
                        Set<Object> oldKeys = new TreeSet<Object>(getKeyBinding());
@@ -370,11 +370,11 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        
                } catch (BindingException e) {
                        throw new AccessorException( e );
-               } finally {\r
-                       writeUnlock();\r
+               } finally {
+                       writeUnlock();
                }
                
-       }\r
+       }
        
        @SuppressWarnings("unchecked")
        @Override
@@ -390,9 +390,9 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        }
                        
                        JavaObject sa = getExistingAccessor(lk);
-                       if (sa!=null) return (T) sa;\r
-                       \r
-                       readLock();\r
+                       if (sa!=null) return (T) sa;
+                       
+                       readLock();
                        try {
                                Binding vb = getBinding().getValueBinding();
                                Binding kb = getBinding().getKeyBinding();
@@ -400,7 +400,7 @@ public class JavaMap extends JavaObject implements MapAccessor {
                                MutableVariant kv = new MutableVariant(kb, lk);
                                        
                                // Instantiate correct sub accessor. 
-                               sa = createSubAccessor(this, vb, lv, params);\r
+                               sa = createSubAccessor(this, vb, lv, params);
                                sa.keyInParent = lk;                    
                                children.put(lk, new SoftReference<JavaObject>(sa));
                                
@@ -434,9 +434,9 @@ public class JavaMap extends JavaObject implements MapAccessor {
                                        // Next listener
                                        le = le.next;
                                }                                       
-                       } finally {\r
-                               readUnlock();\r
-                       }\r
+                       } finally {
+                               readUnlock();
+                       }
                        
                        return (T) sa;
                } catch (BindingException e) {
@@ -469,48 +469,48 @@ public class JavaMap extends JavaObject implements MapAccessor {
        @Override
        public <T extends Accessor> T getComponent(ChildReference reference)
                        throws AccessorConstructionException {
-               if (reference==null) return (T) this;\r
-               if (reference instanceof LabelReference) {\r
-                       LabelReference lr = (LabelReference) reference;\r
-                       try {\r
-                               Binding kb = getKeyBinding();\r
-                               MutableVariant variant = (MutableVariant) adapt(lr.label, Bindings.STRING, Bindings.MUTABLE_VARIANT);\r
-                               Object value = variant.getValue(kb);\r
-                               \r
-                               Accessor result = (T) getValueAccessor(kb, value);\r
-                               if (reference.getChildReference() != null)\r
-                                       result = result.getComponent(reference.getChildReference());\r
-                               return (T) result;                      \r
-                       } catch (AdaptException e2) {\r
-                               throw new ReferenceException(e2);                               \r
-                       } catch (AdapterConstructionException e) {\r
-                               throw new ReferenceException(e);                                \r
-                       }                       \r
+               if (reference==null) return (T) this;
+               if (reference instanceof LabelReference) {
+                       LabelReference lr = (LabelReference) reference;
+                       try {
+                               Binding kb = getKeyBinding();
+                               MutableVariant variant = (MutableVariant) adapt(lr.label, Bindings.STRING, Bindings.MUTABLE_VARIANT);
+                               Object value = variant.getValue(kb);
+                               
+                               Accessor result = (T) getValueAccessor(kb, value);
+                               if (reference.getChildReference() != null)
+                                       result = result.getComponent(reference.getChildReference());
+                               return (T) result;                      
+                       } catch (AdaptException e2) {
+                               throw new ReferenceException(e2);                               
+                       } catch (AdapterConstructionException e) {
+                               throw new ReferenceException(e);                                
+                       }                       
                } else if (reference instanceof KeyReference) {
                        KeyReference ref = (KeyReference) reference;
                        Accessor result = getValueAccessor(ref.key.getBinding(), ref.key.getValue());
                        if (reference.getChildReference() != null)
                                result = result.getComponent(reference.getChildReference());
                        return (T) result;                      
-               } \r
+               } 
                throw new ReferenceException(reference.getClass().getName()+" is not a reference of a map");    
        }
        
        @Override
-       public int size() throws AccessorException {\r
+       public int size() throws AccessorException {
                readLock();
                try {
                        return getBinding().size(object);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       readUnlock();\r
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
        public boolean containsKey(Binding keyBinding, Object key)
-                       throws AccessorException {\r
+                       throws AccessorException {
                readLock();
                try {
                        MapBinding mb = getBinding();
@@ -523,16 +523,16 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException(e);\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException(e);
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
        public boolean containsValue(Binding valueBinding, Object value)
-                       throws AccessorException {\r
+                       throws AccessorException {
                readLock();
                try {
                        MapBinding mb = getBinding();
@@ -545,16 +545,16 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException(e);\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException(e);
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
        public Object get(Binding keyBinding, Object key, Binding valueBinding)
-                       throws AccessorException {\r
+                       throws AccessorException {
                readLock();
                try {
                        MapBinding mb = getBinding();
@@ -564,7 +564,7 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        Binding rvb = valueBinding;
                        Object rk = key;
                        Object lk = adapt(rk, rkb, lkb);
-                       Object lv = mb.get(object, lk);\r
+                       Object lv = mb.get(object, lk);
                        if (lv == null) return null;
                        Object rv = adapt(lv, lvb, rvb);
                        return rv;
@@ -572,55 +572,55 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException(e);\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException(e);
+               } finally {
+                       readUnlock();
                }
-       }\r
-       \r
-       @Override\r
-       public int count(Binding keyBinding, Object from,\r
-                       boolean fromInclusive, Object end, boolean endInclusive)\r
-                       throws AccessorException {\r
-               readLock();\r
-               try {\r
-                       MapBinding mb = getBinding();\r
-                       Object lf = params.adapterScheme.adapt(from, keyBinding, getKeyBinding());\r
-                       Object le = params.adapterScheme.adapt(end, keyBinding, getKeyBinding());\r
-                       return mb.count(object, lf, fromInclusive, le, endInclusive);                   \r
-               } catch (BindingException e) {\r
-                       throw new AccessorException(e);\r
-               } catch (AdaptException e) {\r
-                       throw new AccessorException(e);\r
-               } finally {\r
-                       readUnlock();\r
-               }               \r
-       }\r
-\r
-       \r
-       @Override\r
-       public int getEntries(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive, ArrayBinding keyArrayBinding, Object keysArray, ArrayBinding valueArrayBinding, Object valueArray, int limit) throws AccessorException {\r
-               readLock();\r
-               try {\r
-                       MapBinding mb = getBinding();\r
-                       Object lfrom = params.adapterScheme.adapt(from, keyBinding, getKeyBinding());\r
-                       Object lend = params.adapterScheme.adapt(end, keyBinding, getKeyBinding());\r
-\r
-                       return mb.getEntries(object, lfrom, fromInclusive, lend, endInclusive, keyArrayBinding, keysArray, valueArrayBinding, valueArray, limit);\r
-               } catch (BindingException e) {\r
-                       throw new AccessorException(e);\r
-               } catch (AdaptException e) {\r
-                       throw new AccessorException(e);\r
-               } finally {\r
-                       readUnlock();\r
-               }               \r
-       }\r
+       }
+       
+       @Override
+       public int count(Binding keyBinding, Object from,
+                       boolean fromInclusive, Object end, boolean endInclusive)
+                       throws AccessorException {
+               readLock();
+               try {
+                       MapBinding mb = getBinding();
+                       Object lf = params.adapterScheme.adapt(from, keyBinding, getKeyBinding());
+                       Object le = params.adapterScheme.adapt(end, keyBinding, getKeyBinding());
+                       return mb.count(object, lf, fromInclusive, le, endInclusive);                   
+               } catch (BindingException e) {
+                       throw new AccessorException(e);
+               } catch (AdaptException e) {
+                       throw new AccessorException(e);
+               } finally {
+                       readUnlock();
+               }               
+       }
+
+       
+       @Override
+       public int getEntries(Binding keyBinding, Object from, boolean fromInclusive, Object end, boolean endInclusive, ArrayBinding keyArrayBinding, Object keysArray, ArrayBinding valueArrayBinding, Object valueArray, int limit) throws AccessorException {
+               readLock();
+               try {
+                       MapBinding mb = getBinding();
+                       Object lfrom = params.adapterScheme.adapt(from, keyBinding, getKeyBinding());
+                       Object lend = params.adapterScheme.adapt(end, keyBinding, getKeyBinding());
+
+                       return mb.getEntries(object, lfrom, fromInclusive, lend, endInclusive, keyArrayBinding, keysArray, valueArrayBinding, valueArray, limit);
+               } catch (BindingException e) {
+                       throw new AccessorException(e);
+               } catch (AdaptException e) {
+                       throw new AccessorException(e);
+               } finally {
+                       readUnlock();
+               }               
+       }
                
 
        @Override
        public void getAll(Binding keyBinding, Binding valueBinding, Map<Object, Object> to)
-                       throws AccessorException {\r
+                       throws AccessorException {
                readLock();
                try {
                        MapBinding mb = getBinding();
@@ -644,13 +644,13 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       readUnlock();\r
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public void getAll(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException {\r
+       public void getAll(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException {
                readLock();
                try {
                        int length = getBinding().size(object);
@@ -668,13 +668,13 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       readUnlock();\r
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object[] getKeys(Binding keyBinding) throws AccessorException {\r
+       public Object[] getKeys(Binding keyBinding) throws AccessorException {
                readLock();
                try {
                        Object[] result = getBinding().getKeys(object);                 
@@ -689,13 +689,13 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       readUnlock();\r
+               } finally {
+                       readUnlock();
                }
        }
        
        @Override
-       public Object[] getValues(Binding valueBinding) throws AccessorException {\r
+       public Object[] getValues(Binding valueBinding) throws AccessorException {
                readLock();
                try {
                        Object[] result = getBinding().getValues(object);                       
@@ -710,13 +710,13 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        throw new AccessorException(e);
                } catch (BindingException e) {
                        throw new AccessorException(e);
-               } finally {\r
-                       readUnlock();\r
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object getCeilingKey(Binding keyBinding, Object key) throws AccessorException {\r
+       public Object getCeilingKey(Binding keyBinding, Object key) throws AccessorException {
                readLock();
                try {
                        // Local & Requested Key Bindings
@@ -730,15 +730,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rck;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object getFirstKey(Binding keyBinding) throws AccessorException {\r
+       public Object getFirstKey(Binding keyBinding) throws AccessorException {
                readLock();
                try {
                        Binding lkb = getKeyBinding();
@@ -748,15 +748,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rfk;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
        
        @Override
-       public Object getLastKey(Binding keyBinding) throws AccessorException {\r
+       public Object getLastKey(Binding keyBinding) throws AccessorException {
                readLock();
                try {
                        Binding lkb = getKeyBinding();
@@ -766,15 +766,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rfk;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object getFloorKey(Binding keyBinding, Object key) throws AccessorException {\r
+       public Object getFloorKey(Binding keyBinding, Object key) throws AccessorException {
                readLock();
                try {
                        // Local & Requested Key Bindings
@@ -788,15 +788,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rfk;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object getHigherKey(Binding keyBinding, Object key) throws AccessorException {\r
+       public Object getHigherKey(Binding keyBinding, Object key) throws AccessorException {
                readLock();
                try {
                        // Local & Requested Key Bindings
@@ -810,15 +810,15 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rhk;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
 
        @Override
-       public Object getLowerKey(Binding keyBinding, Object key) throws AccessorException {\r
+       public Object getLowerKey(Binding keyBinding, Object key) throws AccessorException {
                readLock();
                try {
                        // Local & Requested Key Bindings
@@ -832,10 +832,10 @@ public class JavaMap extends JavaObject implements MapAccessor {
                        return rlk;
                } catch (AdaptException e) {
                        throw new AccessorException( e );
-               } catch (AdapterConstructionException e) {\r
-                       throw new AccessorException( e );\r
-               } finally {\r
-                       readUnlock();\r
+               } catch (AdapterConstructionException e) {
+                       throw new AccessorException( e );
+               } finally {
+                       readUnlock();
                }
        }
        
@@ -894,11 +894,11 @@ public class JavaMap extends JavaObject implements MapAccessor {
        Event applyLocal(Event e, boolean makeRollback) throws AccessorException {
                Event rollback = null;
                
-               if (e instanceof ValueAssigned) {\r
-                       ValueAssigned va = (ValueAssigned) e;\r
-                       if (makeRollback) rollback = new ValueAssigned(getBinding(), getValue(getBinding())); \r
-                       setValue(va.newValue.getBinding(), va.newValue.getValue());\r
-                       return rollback;\r
+               if (e instanceof ValueAssigned) {
+                       ValueAssigned va = (ValueAssigned) e;
+                       if (makeRollback) rollback = new ValueAssigned(getBinding(), getValue(getBinding())); 
+                       setValue(va.newValue.getBinding(), va.newValue.getValue());
+                       return rollback;
                } else if (e instanceof MapEntryAdded) {
                        MapEntryAdded ea = (MapEntryAdded) e;
                        if (ea.key==null) throw new AccessorException("Cannot apply entry added event because key is missing");