Class BorderedSearcher<TElement>

java.lang.Object
com._1c.g5.v8.dt.common.search.Searcher<TElement,IBorderedCursor<TElement>>
com._1c.g5.v8.dt.common.search.BorderedSearcher<TElement>
Type Parameters:
TElement - type of collection elements
All Implemented Interfaces:
IBorderedSearcher<TElement>, ISearcher<TElement>
Direct Known Subclasses:
NodeSearcher

public abstract class BorderedSearcher<TElement> extends Searcher<TElement,IBorderedCursor<TElement>> implements IBorderedSearcher<TElement>
Implementation of IBorderedSearcher.
  • Constructor Details

    • BorderedSearcher

      protected BorderedSearcher()
      Creates bordered searcher with empty collection to search.
  • Method Details

    • setSearchBorders

      public void setSearchBorders(TElement from, TElement to)
      Description copied from interface: IBorderedSearcher
      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.
      Specified by:
      setSearchBorders in interface IBorderedSearcher<TElement>
      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

      public void resetSearchBorders()
      Description copied from interface: IBorderedSearcher
      Resets search borders to initial input. Position of current element is moved to the beginning of data.
      Specified by:
      resetSearchBorders in interface IBorderedSearcher<TElement>
    • isInBorders

      public boolean isInBorders(TElement element)
      Description copied from interface: IBorderedSearcher
      Checks if given element complies with current borders restrictions.
      Specified by:
      isInBorders in interface IBorderedSearcher<TElement>
      Parameters:
      element - element to check borders for, cannot be null
      Returns:
      true if element complies with borders, false otherwise or not present in collection