mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 18:15:59 +00:00
[singular][issue #2221] the plural builder method now nullchecks its argument with configurable results.
This commit is contained in:
79 files changed
+841
-114
No files matched your search
@@ -17,6 +17,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withDangerMice(final java.util.Collection<? extends T> dangerMice) {
|
||||
if ((dangerMice == null))
|
||||
throw new java.lang.NullPointerException("dangerMice cannot be null");
|
||||
if ((this.dangerMice == null))
|
||||
this.dangerMice = new java.util.ArrayList<T>();
|
||||
this.dangerMice.addAll(dangerMice);
|
||||
@@ -34,6 +36,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withOctopodes(final java.util.Collection<? extends Number> octopodes) {
|
||||
if ((octopodes == null))
|
||||
throw new java.lang.NullPointerException("octopodes cannot be null");
|
||||
if ((this.octopodes == null))
|
||||
this.octopodes = new java.util.ArrayList<Number>();
|
||||
this.octopodes.addAll(octopodes);
|
||||
@@ -51,6 +55,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withRawSet(final java.util.Collection<?> rawSet) {
|
||||
if ((rawSet == null))
|
||||
throw new java.lang.NullPointerException("rawSet cannot be null");
|
||||
if ((this.rawSet == null))
|
||||
this.rawSet = new java.util.ArrayList<java.lang.Object>();
|
||||
this.rawSet.addAll(rawSet);
|
||||
@@ -68,6 +74,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withStringSet(final java.util.Collection<? extends String> stringSet) {
|
||||
if ((stringSet == null))
|
||||
throw new java.lang.NullPointerException("stringSet cannot be null");
|
||||
if ((this.stringSet == null))
|
||||
this.stringSet = new java.util.ArrayList<String>();
|
||||
this.stringSet.addAll(stringSet);
|
||||
|
||||
Reference in new issue
Block a user