Skip to content

Commit

Permalink
Removed Lombok (except 2 classes for an example).
Browse files Browse the repository at this point in the history
Closes #2.
  • Loading branch information
ychaikin committed Jul 5, 2018
1 parent 0816337 commit a6f49fb
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
package com.clearlydecoded.messenger.demo.message;

import com.clearlydecoded.messenger.Message;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.Objects;

@Data
@AllArgsConstructor
public class GingerCookieOrder implements Message<GingerCookieOrderResponse> {

public static final String TYPE = "FirstAvailableGingerCookieOrder";

private final String type = TYPE;

public GingerCookieOrder() {
}

@Override
public String getType() {
return type;
}

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

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

@Override
public String toString() {
return "GingerCookieOrder{" +
"type='" + type + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,48 @@

import com.clearlydecoded.messenger.MessageResponse;
import com.clearlydecoded.messenger.demo.model.Cookie;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GingerCookieOrderResponse implements MessageResponse {

private Cookie gingerCookie;

public GingerCookieOrderResponse() {
}

public GingerCookieOrderResponse(Cookie gingerCookie) {
this.gingerCookie = gingerCookie;
}

public Cookie getGingerCookie() {
return gingerCookie;
}

public void setGingerCookie(Cookie gingerCookie) {
this.gingerCookie = gingerCookie;
}

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

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

@Override
public String toString() {
return "GingerCookieOrderResponse{" +
"gingerCookie=" + gingerCookie +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
package com.clearlydecoded.messenger.demo.message;

import com.clearlydecoded.messenger.Message;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Objects;

@Data
@NoArgsConstructor
public class SugarComaCookieOrder implements Message<SugarComaCookieOrderResponse> {

public static final String TYPE = "SugarComaCookieOrder";

private final String type = TYPE;

public SugarComaCookieOrder() {
}

@Override
public String getType() {
return type;
}

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

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

@Override
public String toString() {
return "SugarComaCookieOrder{" +
"type='" + type + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,48 @@

import com.clearlydecoded.messenger.MessageResponse;
import com.clearlydecoded.messenger.demo.model.Cookie;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SugarComaCookieOrderResponse implements MessageResponse {

private Cookie sugarComaCookie;

public SugarComaCookieOrderResponse() {
}

public SugarComaCookieOrderResponse(Cookie sugarComaCookie) {
this.sugarComaCookie = sugarComaCookie;
}

public Cookie getSugarComaCookie() {
return sugarComaCookie;
}

public void setSugarComaCookie(Cookie sugarComaCookie) {
this.sugarComaCookie = sugarComaCookie;
}

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

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

@Override
public String toString() {
return "SugarComaCookieOrderResponse{" +
"sugarComaCookie=" + sugarComaCookie +
'}';
}
}

0 comments on commit a6f49fb

Please sign in to comment.