Skip to content

Commit

Permalink
Add non-varargs version of IConfigurable methods to allow implementat…
Browse files Browse the repository at this point in the history
…ions to optimize if they want. (#20)
  • Loading branch information
PaintNinja authored Aug 16, 2024
1 parent 75c62ac commit 7544120
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tasks.named('jar', Jar).configure {
dependencies {
implementation('org.apache.logging.log4j:log4j-api:2.17.0')
// Needed for Type
implementation('org.ow2.asm:asm:9.6')
implementation('org.ow2.asm:asm:9.7')
// Needed for dependency version comparisons
implementation('org.apache.maven:maven-artifact:3.8.1')
// Needed for SecureJar API class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
* This is an interface for querying configuration elements
*/
public interface IConfigurable {
<T> Optional<T> getConfigElement(final String... key);
public List<? extends IConfigurable> getConfigList(final String... key);
default <T> Optional<T> getConfigElement(String key) {
return getConfigElement(new String[] { key });
}

<T> Optional<T> getConfigElement(String... key);

default List<? extends IConfigurable> getConfigList(String key) {
return getConfigList(new String[] { key });
}

List<? extends IConfigurable> getConfigList(String... key);
}

0 comments on commit 7544120

Please sign in to comment.