Interface IBorderedSearcher<TElement>

Type Parameters:
TElement - type of collection elements
All Superinterfaces:
ISearcher<TElement>
All Known Implementing Classes:
BorderedSearcher, NodeSearcher

public interface IBorderedSearcher<TElement> extends ISearcher<TElement>
Represents searcher allowing narrowing searching to interval.
  • Method Details

    • setSearchBorders

      void setSearchBorders(TElement from, TElement to)
      Narrows search borders of given collection to elements contained between from and to inclusively. Position of current element is moved right before from argument. Elements must be present in the collection search is performed in. When empty interval is needed, both parameters must be null.
      Parameters:
      from - the starting border of collection which must be followed by or same as to, can be null
      to - the end border of collection which must be preceded by or same as from, can be null
    • resetSearchBorders

      void resetSearchBorders()
      Resets search borders to initial input. Position of current element is moved to the beginning of data.
    • isInBorders

      boolean isInBorders(TElement element)
      Checks if given element complies with current borders restrictions.
      Parameters:
      element - element to check borders for, cannot be null
      Returns:
      true if element complies with borders, false otherwise or not present in collection