Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/main/java/com/github/skiwi2/hearthmonitor/logreader/ObjectParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.github.skiwi2.hearthmonitor.logreader; | ||
|
||
import com.github.skiwi2.hearthmonitor.logapi.LogObject; | ||
|
||
/** | ||
* Used to parse log objects from a string. | ||
* | ||
* @author Frank van Heeswijk | ||
*/ | ||
public interface ObjectParser { | ||
/** | ||
* Returns whether this object parser can parse the input. | ||
* | ||
* @param input The input to check parsability for | ||
* @return Whether this object parser can parse the input. | ||
*/ | ||
boolean isParsable(final String input); | ||
|
||
/** | ||
* Parses the input String resulting in a LogObject. | ||
* | ||
* @param input The input to parse | ||
* @return The LogObject obtained after parsing the input. | ||
* @throws com.github.skiwi2.hearthmonitor.logreader.NotParsableException If this entry reader cannot parse the input to return a LogObject. | ||
*/ | ||
LogObject parse(final String input) throws NotParsableException; | ||
} |