Class SearchTermList

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<de.intranda.api.iiif.search.SearchTerm>
io.goobi.viewer.model.iiif.search.model.SearchTermList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<de.intranda.api.iiif.search.SearchTerm>, Collection<de.intranda.api.iiif.search.SearchTerm>, List<de.intranda.api.iiif.search.SearchTerm>, RandomAccess

public class SearchTermList extends ArrayList<de.intranda.api.iiif.search.SearchTerm>
A collection of search terms. If a SearchTerm is to be added which already exists in the list, the SearchTerm.getCount() is increased by one instead
Author:
florian
See Also:
  • Constructor Details

    • SearchTermList

      public SearchTermList()

      Constructor for SearchTermList.

  • Method Details

    • add

      public boolean add(de.intranda.api.iiif.search.SearchTerm term)
      Adds the given term to the list if no term with the same SearchTerm.getMatch() exists. Otherwise add the SearchTerm.getCount() of the given term to the existing term
      Specified by:
      add in interface Collection<de.intranda.api.iiif.search.SearchTerm>
      Specified by:
      add in interface List<de.intranda.api.iiif.search.SearchTerm>
      Overrides:
      add in class ArrayList<de.intranda.api.iiif.search.SearchTerm>
    • addAll

      public boolean addAll(Collection<? extends de.intranda.api.iiif.search.SearchTerm> c)
      Specified by:
      addAll in interface Collection<de.intranda.api.iiif.search.SearchTerm>
      Specified by:
      addAll in interface List<de.intranda.api.iiif.search.SearchTerm>
      Overrides:
      addAll in class ArrayList<de.intranda.api.iiif.search.SearchTerm>