JAVA-10625: Remove module immutables

This commit is contained in:
sampadawagde
2022-04-12 20:43:57 +05:30
parent 813b27588e
commit 35fd43e577
14 changed files with 14 additions and 53 deletions
@@ -0,0 +1,9 @@
package com.baeldung.immutable;
import org.immutables.value.Value;
@Value.Immutable
public interface Address {
String getStreetName();
Integer getNumber();
}
@@ -0,0 +1,9 @@
package com.baeldung.immutable;
import org.immutables.value.Value;
@Value.Immutable
public abstract class Person {
abstract String getName();
abstract Integer getAge();
}
@@ -0,0 +1,13 @@
package com.baeldung.immutable.auxiliary;
import org.immutables.value.Value;
@Value.Immutable
public abstract class Person {
abstract String getName();
abstract Integer getAge();
@Value.Auxiliary
abstract String getAuxiliaryField();
}
@@ -0,0 +1,14 @@
package com.baeldung.immutable.default_;
import org.immutables.value.Value;
@Value.Immutable(prehash = true)
public abstract class Person {
abstract String getName();
@Value.Default
Integer getAge() {
return 42;
}
}
@@ -0,0 +1,14 @@
package com.baeldung.immutable.parameter;
import org.immutables.value.Value;
@Value.Immutable
public abstract class Person {
@Value.Parameter
abstract String getName();
@Value.Parameter
abstract Integer getAge();
}
@@ -0,0 +1,9 @@
package com.baeldung.immutable.prehash;
import org.immutables.value.Value;
@Value.Immutable(prehash = true)
public abstract class Person {
abstract String getName();
abstract Integer getAge();
}