Package org.hildan.hashcode.utils.reader
Class HCReaderKt
-
- All Implemented Interfaces:
public final class HCReaderKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static RegexDEFAULT_HASHCODE_INPUT_DELIMITER
-
Method Summary
Modifier and Type Method Description final RegexgetDEFAULT_HASHCODE_INPUT_DELIMITER()The most likely delimiter to use in HashCode input files. final static <P extends Any> PwithHCReader(String input, Regex tokenDelimiter, Function1<HCReader, P> readProblem)Executes the given readProblem function on a new HCReader, reading the given input text. final static <P extends Any> PwithHCReader(Path path, Regex tokenDelimiter, Function1<HCReader, P> readProblem)Executes the given readProblem function on a new HCReader, reading the file at the given path. -
-
Method Detail
-
getDEFAULT_HASHCODE_INPUT_DELIMITER
final Regex getDEFAULT_HASHCODE_INPUT_DELIMITER()
The most likely delimiter to use in HashCode input files.
-
withHCReader
final static <P extends Any> P withHCReader(String input, Regex tokenDelimiter, Function1<HCReader, P> readProblem)
Executes the given readProblem function on a new HCReader, reading the given input text. The reader is closed whether an exception is thrown or not.
-
-
-
-