Ignore:
Timestamp:
2012-03-22T08:37:48+01:00 (12 years ago)
Author:
akks
Message:

see #4421: Mechanism to modify JOSM settings and store files, advanced preferences dialog modifications
+ JavaScript configuration API
+ Asynchronous file download task DownloadFileTask
+ Function to export arbitrary preference keys to file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r5069 r5114  
    17491749        }
    17501750    }
     1751
     1752    public static boolean isEqual(Setting a, Setting b) {
     1753        if (a==null && b==null) return true;
     1754        if (a==null) return false;
     1755        if (b==null) return false;
     1756        if (a==b) return true;
     1757       
     1758        if (a instanceof StringSetting)
     1759            return (a.getValue().equals(b.getValue()));
     1760        if (a instanceof ListSetting)
     1761            return equalCollection((Collection<String>) a.getValue(), (Collection<String>) b.getValue());
     1762        if (a instanceof ListListSetting)
     1763            return equalArray((Collection<Collection<String>>) a.getValue(), (Collection<List<String>>) b.getValue());
     1764        if (a instanceof MapListSetting)
     1765            return equalListOfStructs((Collection<Map<String, String>>) a.getValue(), (Collection<Map<String, String>>) b.getValue());
     1766        return a.equals(b);
     1767    }
     1768
    17511769}
Note: See TracChangeset for help on using the changeset viewer.