Skip to content

Commit 5827f74

Browse files
authored
Merge pull request #51 from lordofthejars/overload-link-types
Overload the linkTypes method to add the var-args approach
2 parents e56e537 + 5da00fb commit 5827f74

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/nibor/autolink/LinkExtractor.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ public static class Builder {
9090
private Builder() {
9191
}
9292

93+
/**
94+
* @param linkTypes the link types that should be extracted (by default, all types are extracted)
95+
* @return this builder
96+
*/
97+
public Builder linkTypes(LinkType... linkTypes) {
98+
if (linkTypes == null) {
99+
throw new NullPointerException("linkTypes must not be null");
100+
}
101+
return this.linkTypes(Set.of(linkTypes));
102+
}
103+
93104
/**
94105
* @param linkTypes the link types that should be extracted (by default, all types are extracted)
95106
* @return this builder

0 commit comments

Comments
 (0)