There is CharStreamScanner with an implementation CharSequenceScanner for CharSequences.
We need a new implementation CharReaderScanner for Reader instances (in util-io or in the same base package in util-core - tbd).
Further it will make sense to extract an abstract super-class for both implementations.
Finally the method getCurrentIndex() shall be removed from CharStreamScanner as it makes no sense there. Otherwise the return type would need to be changed to long but this would only cause overhead with almost no use.
There is
CharStreamScanner
with an implementationCharSequenceScanner
forCharSequences
. We need a new implementationCharReaderScanner
forReader
instances (inutil-io
or in the same base package inutil-core
- tbd). Further it will make sense to extract an abstract super-class for both implementations. Finally the methodgetCurrentIndex()
shall be removed fromCharStreamScanner
as it makes no sense there. Otherwise the return type would need to be changed tolong
but this would only cause overhead with almost no use.