mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 06:17:44 +00:00
[records] [@NonNull] eclipse impl onfthe @NonNull on record components feature.
All tests passing.
This commit is contained in:
76 files changed
+316
-131
No files matched your search
@@ -1,6 +1,6 @@
|
||||
// version 14:
|
||||
import lombok.With;
|
||||
record WithOnRecordComponent(String a, String b) {
|
||||
public record WithOnRecordComponent(String a, String b) {
|
||||
/* Implicit */ private final String a;
|
||||
/* Implicit */ private final String b;
|
||||
public WithOnRecordComponent( String a, String b) {
|
||||
@@ -8,6 +8,9 @@ record WithOnRecordComponent(String a, String b) {
|
||||
.a = a;
|
||||
.b = b;
|
||||
}
|
||||
/**
|
||||
* @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
|
||||
*/
|
||||
public @java.lang.SuppressWarnings("all") WithOnRecordComponent withA(final String a) {
|
||||
return ((this.a == a) ? this : new WithOnRecordComponent(a, this.b));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user