doc / ch.tutteli.atrium.domain.creating.charsequence.contains / CharSequenceContains / Searcher

Searcher

interface Searcher<S : SearchBehaviour> (source)

Represents a searcher which supports the search behaviour S for a given input CharSequence of the search.

Parameters

S - The search behaviour which should be applied to the input CharSequence in which the Searcher will look for something -- the actual implementation of the search behaviour happens in the Searcher; SearchBehaviour only decorates the Translatable for reporting.

Functions

search

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.

Inheritors

Searcher

interface Searcher<S : SearchBehaviour> : Searcher<S>

Represents a deprecated searcher which supports the search behaviour S for a given input CharSequence of the search.