Ignore:
Timestamp:
2017-11-28T00:56:29+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15310 - remove most of deprecated APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java

    r12859 r13173  
    55import java.util.Collection;
    66import java.util.Collections;
    7 import java.util.List;
    87import java.util.Set;
    9 import java.util.stream.Collectors;
    108
    119import javax.swing.JTable;
     
    5149
    5250    /**
    53      * applies a filter expression to the list of {@link AutoCompletionListItem}s.
     51     * applies a filter expression to the list of {@link AutoCompletionItem}s.
    5452     *
    5553     * The matching criterion is a case insensitive substring match.
     
    8179
    8280    /**
    83      * adds an {@link AutoCompletionListItem} to the list. Only adds the item if it
    84      * is not null and if not in the list yet.
    85      *
    86      * @param item the item
    87      * @deprecated To be removed end of 2017. Use {@link #add(AutoCompletionItem)} instead
    88      */
    89     @Deprecated
    90     public void add(AutoCompletionListItem item) {
    91         if (item == null)
    92             return;
    93         add(item.getItem());
    94     }
    95 
    96     /**
    9781     * adds an {@link AutoCompletionItem} to the list. Only adds the item if it
    9882     * is not null and if not in the list yet.
     
    135119
    136120    /**
    137      * adds a list of {@link AutoCompletionListItem} to this list. Only items which
    138      * are not null and which do not exist yet in the list are added.
    139      *
    140      * @param other a list of AutoCompletionListItem; must not be null
    141      * @throws IllegalArgumentException if other is null
    142      * @deprecated to be removed end of 2017. Use {@link #add(Collection)} instead
    143      */
    144     @Deprecated
    145     public void add(List<AutoCompletionListItem> other) {
    146         CheckParameterUtil.ensureParameterNotNull(other, "other");
    147         add(other.stream().map(AutoCompletionListItem::getItem).collect(Collectors.toList()));
    148     }
    149 
    150     /**
    151121     * adds a list of strings to this list. Only strings which
    152122     * are not null and which do not exist yet in the list are added.
     
    154124     * @param values a list of strings to add
    155125     * @param priority the priority to use
    156      * @deprecated to be removed end of 2017. Use {@link #add(Collection, AutoCompletionPriority)} instead
    157      */
    158     @Deprecated
    159     public void add(Collection<String> values, AutoCompletionItemPriority priority) {
    160         add(values, priority.getPriority());
    161     }
    162 
    163     /**
    164      * adds a list of strings to this list. Only strings which
    165      * are not null and which do not exist yet in the list are added.
    166      *
    167      * @param values a list of strings to add
    168      * @param priority the priority to use
    169126     * @since 12859
    170127     */
     
    183140            filter();
    184141        }
    185     }
    186 
    187     /**
    188      * checks whether a specific item is already in the list. Matches for the
    189      * the value <strong>and</strong> the priority of the item
    190      *
    191      * @param item the item to check
    192      * @return true, if item is in the list; false, otherwise
    193      * @deprecated to be removed end of 2017. Use {@link #contains(AutoCompletionItem)} instead
    194      */
    195     @Deprecated
    196     public boolean contains(AutoCompletionListItem item) {
    197         if (item == null)
    198             return false;
    199         return contains(item.getItem());
    200142    }
    201143
     
    264206     *
    265207     * @throws IndexOutOfBoundsException if idx is out of bounds
    266      * @deprecated to be removed end of 2017. Use {@link #getFilteredItemAt(int)} instead
    267      */
    268     @Deprecated
    269     public AutoCompletionListItem getFilteredItem(int idx) {
    270         return new AutoCompletionListItem(getFilteredItemAt(idx));
    271     }
    272 
    273     /**
    274      * replies the idx-th item from the list of filtered items
    275      * @param idx the index; must be in the range 0 &lt;= idx &lt; {@link #getFilteredSize()}
    276      * @return the item
    277      *
    278      * @throws IndexOutOfBoundsException if idx is out of bounds
    279208     * @since 12859
    280209     */
Note: See TracChangeset for help on using the changeset viewer.