Class AutoCompletionList

    • Method Detail

      • applyFilter

        public void applyFilter​(String filter)
        applies a filter expression to the list of AutoCompletionItems. The matching criterion is a case insensitive substring match.
        Parameters:
        filter - the filter expression; must not be null
        Throws:
        IllegalArgumentException - if filter is null
      • clearFilter

        public void clearFilter()
        clears the current filter
      • getFilter

        public String getFilter()
        Returns the current filter expression.
        Returns:
        the current filter expression; null, if no filter expression is set
      • add

        public void add​(AutoCompletionItem item)
        adds an AutoCompletionItem to the list. Only adds the item if it is not null and if not in the list yet.
        Parameters:
        item - the item
        Since:
        12859
      • add

        public void add​(Collection<String> values,
                        AutoCompletionPriority priority)
        adds a list of strings to this list. Only strings which are not null and which do not exist yet in the list are added.
        Parameters:
        values - a list of strings to add
        priority - the priority to use
        Since:
        12859
      • addUserInput

        public void addUserInput​(Collection<String> values)
        Adds values that have been entered by the user.
        Parameters:
        values - values that have been entered by the user
      • contains

        public boolean contains​(AutoCompletionItem item)
        checks whether a specific item is already in the list. Matches for the the value and the priority of the item
        Parameters:
        item - the item to check
        Returns:
        true, if item is in the list; false, otherwise
        Since:
        12859
      • contains

        public boolean contains​(String value)
        checks whether an item with the given value is already in the list. Ignores priority of the items.
        Parameters:
        value - the value of an auto completion item
        Returns:
        true, if value is in the list; false, otherwise
      • remove

        public void remove​(String key)
        removes the auto completion item with key key
        Parameters:
        key - the key
      • filter

        protected void filter()
      • getFilteredSize

        public int getFilteredSize()
        replies the number of filtered items
        Returns:
        the number of filtered items
      • clear

        public void clear()
        removes all elements from the auto completion list