Ignore:
Timestamp:
2017-09-24T11:11:20+02:00 (2 years ago)
Author:
bastiK
Message:

see #15229 - update method name and signature for consistency

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

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

    r12891 r12894  
    10781078     * @param def The default value
    10791079     * @return The integer value or the default value if it could not be parsed
    1080      * @deprecated use {@link PreferencesUtils#getInteger(IPreferences, String, String, int)
     1080     * @deprecated use {@link PreferencesUtils#getInteger(IPreferences, String, String, int)}
    10811081     */
    10821082    @Deprecated
     
    11261126     * @param value The value that should be removed in the collection
    11271127     * @see #getList(String)
    1128      * @deprecated use {@link PreferencesUtils#removeFromCollection(IPreferences, String, String)}
     1128     * @deprecated use {@link PreferencesUtils#removeFromList(IPreferences, String, String)}
    11291129     */
    11301130    @Deprecated
     
    12361236     * @param val value
    12371237     * @return {@code true}, if something has changed (i.e. value is different than before)
    1238      * @deprecated use {@link PreferencesUtils#putCollectionBounded(IPreferences, String, int, Collection)}
     1238     * @deprecated use {@link PreferencesUtils#putListBounded(IPreferences, String, int, List)}
    12391239     */
    12401240    @Deprecated
  • trunk/src/org/openstreetmap/josm/data/PreferencesUtils.java

    r12891 r12894  
    528528
    529529    /**
    530      * Removes a value from a given String collection
     530     * Removes a value from a given String list
    531531     * @param prefs the preferences
    532      * @param key The preference key the collection is stored with
    533      * @param value The value that should be removed in the collection
    534      * @see #getList(String)
    535      * @since 12891
    536      */
    537     public static void removeFromCollection(IPreferences prefs, String key, String value) {
     532     * @param key The preference key the list is stored with
     533     * @param value The value that should be removed in the list
     534     * @since 12894
     535     */
     536    public static void removeFromList(IPreferences prefs, String key, String value) {
    538537        synchronized (prefs) {
    539538            List<String> a = new ArrayList<>(prefs.getList(key, Collections.<String>emptyList()));
     
    544543
    545544    /**
    546      * Saves at most {@code maxsize} items of collection {@code val}.
     545     * Saves at most {@code maxsize} items of list {@code val}.
    547546     * @param prefs the preferences
    548547     * @param key key
     
    550549     * @param val value
    551550     * @return {@code true}, if something has changed (i.e. value is different than before)
    552      * @since 12891
    553      */
    554     public static boolean putCollectionBounded(IPreferences prefs, String key, int maxsize, Collection<String> val) {
     551     * @since 12894
     552     */
     553    public static boolean putListBounded(IPreferences prefs, String key, int maxsize, List<String> val) {
    555554        List<String> newCollection = new ArrayList<>(Math.min(maxsize, val.size()));
    556555        for (String i : val) {
Note: See TracChangeset for help on using the changeset viewer.