mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-19 04:16:15 +00:00
Changed @Value to no longer imply @Wither. Usually you want only
a few or no withers at all, and adding them is a lot simpler than removing them. This is a breaking change, but then that's why @Value was in experimental in the first place.
This commit is contained in:
1 parent
ed61012f95
commit
06537da4e0
8 files changed
+12
-81
No files matched your search
@@ -15,14 +15,6 @@ final class Value1 {
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value1 withX(final int x) {
|
||||
return this.x == x ? this : new Value1(x, this.name);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value1 withName(final String name) {
|
||||
return this.name == name ? this : new Value1(this.x, name);
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public boolean equals(final java.lang.Object o) {
|
||||
@@ -68,14 +60,6 @@ class Value2 {
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value2 withX(final int x) {
|
||||
return this.x == x ? this : new Value2(x, this.name);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value2 withName(final String name) {
|
||||
return this.name == name ? this : new Value2(this.x, name);
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public boolean equals(final java.lang.Object o) {
|
||||
@@ -126,14 +110,6 @@ final class Value3 {
|
||||
public int getY() {
|
||||
return this.y;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value3 withX(final int x) {
|
||||
return this.x == x ? this : new Value3(x, this.y);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Value3 withY(final int y) {
|
||||
return this.y == y ? this : new Value3(this.x, y);
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public boolean equals(final java.lang.Object o) {
|
||||
|
||||
Reference in new issue
Block a user