interface ISearcher<S : ISearchBehaviour>
Represents a searcher which supports the search behaviour S for a given input CharSequence of the search.
S
- The search behaviour which should be applied to the input CharSequence in which the ISearcher
will look for something -- the actual implementation of the search behaviour happens in the
ISearcher; ISearchBehaviour only decorates the ITranslatable for reporting.
abstract fun search(searchIn: CharSequence, searchFor: Any): Int
Searches in the given searchIn for the given searchFor, using its toString implementation, and returns the number of occurrences. |
class CharSequenceContainsIgnoringCaseIndexSearcher : ISearcher<CharSequenceContainsIgnoringCaseSearchBehaviour>
Represents an ISearcher which implements the CharSequenceContainsIgnoringCaseSearchBehaviour behaviour and uses CharSequence.indexOf to find expected objects. |
|
class CharSequenceContainsIgnoringCaseRegexSearcher : ISearcher<CharSequenceContainsIgnoringCaseSearchBehaviour>
Represents an ISearcher which implements the CharSequenceContainsIgnoringCaseSearchBehaviour behaviour and evaluates the matches of a given regular expression on the input of the search. |
|
class CharSequenceContainsIndexSearcher : ISearcher<CharSequenceContainsNoOpSearchBehaviour>
Represents an ISearcher which uses CharSequence.indexOf to find expected objects. |
|
class CharSequenceContainsRegexSearcher : ISearcher<CharSequenceContainsNoOpSearchBehaviour>
Represents an ISearcher which evaluates the matches of a given regular expression on the input of the search. |