package nl.homesensors.sensortag;

import java.util.Objects;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;

@RequiredArgsConstructor
public final class SensorCode {

    @Getter
    private final String value;

    public static SensorCode of(final String value) {
        return new SensorCode(value);
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final SensorCode that = (SensorCode) o;
        return Objects.equals(value, that.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(value);
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this).append("value", value)
                                        .toString();
    }
}

@@ -39,27 +39,33 @@
 ort 
-java.util.Objects;%0A
+lombok.EqualsAndHashCode;
 %0Aimp
@@ -133,40 +133,14 @@
 ort 
-org.apache.commons.lang3.builder
+lombok
 .ToS
@@ -144,23 +144,16 @@
 ToString
-Builder
 ;%0A%0A@Requ
@@ -172,16 +172,45 @@
 tructor%0A
+@ToString%0A@EqualsAndHashCode%0A
 public f
@@ -380,575 +380,7 @@
    %7D
-%0A%0A    @Override%0A    public boolean equals(final Object o) %7B%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (o == null %7C%7C getClass() != o.getClass()) %7B%0A            return false;%0A        %7D%0A        final SensorCode that = (SensorCode) o;%0A        return Objects.equals(value, that.value);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(value);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return new ToStringBuilder(this).append(%22value%22, value)%0A                                        .toString();%0A    %7D
 %0A%7D%0A

Replace custom ToString, Equals And HashCode with Lombok annotations