Skip to content

Commit 609da80

Browse files
committed
added method overloads
1 parent 798aa1d commit 609da80

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<groupId>net.azalealibrary</groupId>
1515
<artifactId>configuration</artifactId>
16-
<version>1.0.6</version>
16+
<version>1.0.7</version>
1717

1818
<repositories>
1919
<repository>

src/main/java/net/azalealibrary/configuration/property/ListProperty.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ public final class ListProperty<T> extends ConfigurableProperty<T, List<T>> {
1919
private static final String REMOVE = "remove";
2020
private static final String REPLACE = "replace";
2121

22+
@SafeVarargs
23+
public ListProperty(PropertyType<T> type, Supplier<List<T>> defaultValue, String name, AssignmentPolicy<T>... policies) {
24+
this(type, defaultValue, name, v -> {}, policies);
25+
}
26+
2227
@SafeVarargs
2328
public ListProperty(PropertyType<T> type, Supplier<List<T>> defaultValue, String name, Consumer<List<T>> callback, AssignmentPolicy<T>... policies) {
2429
this(type, defaultValue, name, name, callback, policies);

src/main/java/net/azalealibrary/configuration/property/Property.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
public final class Property<T> extends ConfigurableProperty<T, T> {
1313

14+
@SafeVarargs
15+
public Property(PropertyType<T> type, Supplier<T> defaultValue, String name, AssignmentPolicy<T>... policies) {
16+
this(type, defaultValue, name, name, v -> {}, policies);
17+
}
18+
1419
@SafeVarargs
1520
public Property(PropertyType<T> type, Supplier<T> defaultValue, String name, Consumer<T> callback, AssignmentPolicy<T>... policies) {
1621
this(type, defaultValue, name, name, callback, policies);

0 commit comments

Comments
 (0)