Package com._1c.g5.v8.dt.common.search
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
.-
Field Summary
Fields inherited from class com._1c.g5.v8.dt.common.search.Searcher
cursor, filter, filterData
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates bordered searcher with empty collection to search. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isInBorders
(TElement element) Checks if given element complies with current borders restrictions.void
Resets search borders to initial input.void
setSearchBorders
(TElement from, TElement to) Narrows search borders of given collection to elements contained betweenfrom
andto
inclusively.Methods inherited from class com._1c.g5.v8.dt.common.search.Searcher
canRepositionTo, canSearch, canSearchNext, canSearchPrev, getCursor, getFilter, getFilterData, getFilterToPreservePositionOf, init, repositionTo, repositionToNextElement, repositionToPrevElement, repositionToTheBeginning, repositionToTheEnd, resetSearch, search, searchBack, setFilterData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com._1c.g5.v8.dt.common.search.ISearcher
canRepositionTo, canSearch, canSearchNext, canSearchPrev, getElementType, getFilterData, init, repositionTo, repositionToNextElement, repositionToPrevElement, repositionToTheBeginning, repositionToTheEnd, resetSearch, search, searchBack, setFilterData
-
Constructor Details
-
BorderedSearcher
protected BorderedSearcher()Creates bordered searcher with empty collection to search.
-
-
Method Details
-
setSearchBorders
Description copied from interface:IBorderedSearcher
Narrows search borders of given collection to elements contained betweenfrom
andto
inclusively. Position of current element is moved right beforefrom
argument. Elements must be present in the collection search is performed in. When empty interval is needed, both parameters must benull
.- Specified by:
setSearchBorders
in interfaceIBorderedSearcher<TElement>
- Parameters:
from
- the starting border of collection which must be followed by or same asto
, can benull
to
- the end border of collection which must be preceded by or same asfrom
, can benull
-
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 interfaceIBorderedSearcher<TElement>
-
isInBorders
Description copied from interface:IBorderedSearcher
Checks if given element complies with current borders restrictions.- Specified by:
isInBorders
in interfaceIBorderedSearcher<TElement>
- Parameters:
element
- element to check borders for, cannot benull
- Returns:
true
if element complies with borders,false
otherwise or not present in collection
-