Skip to content

Commit

Permalink
Add JavaDoc to functional interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yisiox committed Feb 12, 2024
1 parent 6cb057b commit 2a85901
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/earl/util/parsers/ParseFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import earl.exceptions.EarlException;

/**
* Custom functional interface for parse functions.
*
* @param <T> the type that the parser returns
*/
@FunctionalInterface
public interface ParseFunction<T> {
T apply(String str) throws EarlException;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/earl/util/parsers/TaskStorageParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
*/
public class TaskStorageParser extends StorageParser<Task> {

/**
* Returns a {@code Task} object based on the stored string.
*
* @param entry storage entry string
* @return a {@code Task} object
* @throws EarlException if the storage entry is incomprehensible
*/
public static Task parse(String entry) throws EarlException {
try {
String[] data = entry.split(",");
Expand Down

0 comments on commit 2a85901

Please sign in to comment.