Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.fasterxml.jackson.annotation.JsonCreator;
- import test.protobuf.Test;
- public class Wrapper {
- public Test.Foo foo;
- @JsonCreator
- public Wrapper(Test.Foo foo) {
- this.foo = foo;
- }
- public Wrapper() {
- this(null);
- }
- @Override
- public boolean equals(Object other) {
- if (this == other) return true;
- if ( !(other instanceof Wrapper)) return false;
- final Wrapper wrapper = (Wrapper) other;
- if (foo == null) return wrapper.foo == null;
- return wrapper.foo.equals(foo);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement