Skip to content

Commit

Permalink
Added Result.reject(List<Reportable>) overloaded method.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonJohnGrenier committed Jul 17, 2017
1 parent be635ea commit 9ee925b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/fm/pattern/valex/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public static <T> Result<T> reject(Reportable... errors) {
return new Result<>(null, errors);
}

public static <T> Result<T> reject(List<Reportable> errors) {
return new Result<>(null, errors.toArray(new Reportable[errors.size()]));
}

public T getInstance() {
return instance;
}
Expand Down

0 comments on commit 9ee925b

Please sign in to comment.