All Known Implementing Classes:
StartsWithLookUpAgent

public interface ILookUp

Interface for implementing algorithms that get a sublist of items that match with a text written according an orthographical rules and particular search requirements.

There are two possibilities, considering or ignoring case sensitive.

The particular implementation will be useful to integrate customized algorithms as the look up logic in the JComboBoxConfigurableLookUp model.

Version:
07/02/2008
Author:
Pablo Piqueras Bartolomé (pablo.piqueras@iver.es)
  • Method Details

    • doLookUpConsideringCaseSensitive

      List<Object> doLookUpConsideringCaseSensitive(String text, Vector<Object> sortOrderedItems, StringComparator comp)

      This method should be used when is wanted to distinguish small letters from capital letters during the search.

      It's necessary that all items of the array implement the Comparable interface.

      It's also necessary that the value returned by the toString() method of each item (supposing they inherit from Object) would be the expected value user saw (that would be used to compare the items).

      And elements of the Vector should be sort ordered by a StringComparator with the same configuration as comp.

      Parameters:
      text - java.lang.String
      sortOrderedItems - java.util.Vector
      comp - An StringComparator object which implements the compareTo() method. Must have the same configuration that was used to sort order the items of sortOrderedItems.
      Returns:
      A sublist with all items that carry out with the particular search algorithm requirements
    • doLookUpIgnoringCaseSensitive

      List<Object> doLookUpIgnoringCaseSensitive(String text, Vector<Object> sortOrderedItems, StringComparator comp)

      This method should be used when is wanted not to distinguish small letters from capital letters during the search, and the comparison of items done according an algorithm we define.

      It's necessary that all items of the array implement the Comparable interface.

      It's also necessary that the value returned by the toString() method of each item (supposing they inherit from Object) would be the expected value user saw (that would be used to compare the items).

      And elements of the Vector should be sort ordered by a StringComparator with the same configuration as comp.

      Parameters:
      text - java.lang.String
      sortOrderedItems - java.util.Vector
      comp - An StringComparator object which implements the compareTo() method. Must have the same configuration that was used to sort order the items of sortOrderedItems.
      Returns:
      A sublist with all items that carry out with the particular search algorithm requirements