@Test public void testEquals() { Variable variable = new Variable(); variable.setType(Type.INTEGER); Variable initialInstance = clone(variable); EqualsTester equalsTester = new EqualsTester(); equalsTester.addEqualityGroup(initialInstance, initialInstance).addEqualityGroup(new Object()); variable.setDescription("description"); equalsTester.addEqualityGroup(clone(variable)); variable.setDisplayName("display name"); equalsTester.addEqualityGroup(clone(variable)); variable.setFields(ImmutableMap.of("f", new Field())); equalsTester.addEqualityGroup(clone(variable)); variable.setLongDescription("long description"); equalsTester.addEqualityGroup(clone(variable)); variable.setMinElements(1); equalsTester.addEqualityGroup(clone(variable)); variable.setMinLength(1); equalsTester.addEqualityGroup(clone(variable)); variable.setOptional(true); equalsTester.addEqualityGroup(clone(variable)); variable.setType(Type.BOOLEAN); equalsTester.addEqualityGroup(clone(variable)); variable.setValue(BooleanNode.TRUE); equalsTester.addEqualityGroup(clone(variable)); variable.setValues(ImmutableList.of()); equalsTester.addEqualityGroup(clone(variable)); equalsTester.testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Variable variable = (Variable) o; return _optional == variable._optional && Objects.equals(_description, variable._description) && Objects.equals(_displayName, variable._displayName) && Objects.equals(_fields, variable._fields) && Objects.equals(_longDescription, variable._longDescription) && Objects.equals(_minElements, variable._minElements) && Objects.equals(_minLength, variable._minLength) && _type == variable._type && Objects.equals(_value, variable._value) && Objects.equals(_values, variable._values); }
Variable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Variable variable = (Variable) o; return _optional == variable._optional && Objects.equals(_description, variable._description) && Objects.equals(_displayName, variable._displayName) && Objects.equals(_fields, variable._fields) && Objects.equals(_longDescription, variable._longDescription) && Objects.equals(_minElements, variable._minElements) && Objects.equals(_minLength, variable._minLength) && _type == variable._type && Objects.equals(_value, variable._value) && Objects.equals(_values, variable._values); } }
Variable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Variable variable = (Variable) o; return _optional == variable._optional && Objects.equals(_description, variable._description) && Objects.equals(_displayName, variable._displayName) && Objects.equals(_fields, variable._fields) && Objects.equals(_longDescription, variable._longDescription) && Objects.equals(_minElements, variable._minElements) && Objects.equals(_minLength, variable._minLength) && _type == variable._type && Objects.equals(_value, variable._value) && Objects.equals(_values, variable._values); } Variable(); }
Variable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Variable variable = (Variable) o; return _optional == variable._optional && Objects.equals(_description, variable._description) && Objects.equals(_displayName, variable._displayName) && Objects.equals(_fields, variable._fields) && Objects.equals(_longDescription, variable._longDescription) && Objects.equals(_minElements, variable._minElements) && Objects.equals(_minLength, variable._minLength) && _type == variable._type && Objects.equals(_value, variable._value) && Objects.equals(_values, variable._values); } Variable(); @JsonProperty(BfConsts.PROP_ALLOWED_VALUES) @Deprecated SortedSet<String> getAllowedValues(); @JsonProperty(BfConsts.PROP_DESCRIPTION) String getDescription(); @JsonProperty(BfConsts.PROP_DISPLAY_NAME) @Nullable String getDisplayName(); @JsonProperty(BfConsts.PROP_FIELDS) @Nullable Map<String, Field> getFields(); @JsonProperty(BfConsts.PROP_LONG_DESCRIPTION) String getLongDescription(); @JsonProperty(BfConsts.PROP_MIN_ELEMENTS) Integer getMinElements(); @JsonProperty(BfConsts.PROP_MIN_LENGTH) Integer getMinLength(); @JsonProperty(BfConsts.PROP_OPTIONAL) boolean getOptional(); @JsonProperty(BfConsts.PROP_TYPE) Variable.Type getType(); @Override boolean equals(Object o); @Override int hashCode(); @JsonProperty(BfConsts.PROP_VALUE) @JsonInclude(Include.NON_NULL) JsonNode getValue(); @JsonProperty(BfConsts.PROP_VALUES) List<AllowedValue> getValues(); @JsonProperty(BfConsts.PROP_ALLOWED_VALUES) @Deprecated void setAllowedValues(SortedSet<String> allowedValues); @JsonProperty(BfConsts.PROP_DESCRIPTION) void setDescription(String description); @JsonProperty(BfConsts.PROP_DISPLAY_NAME) void setDisplayName(@Nullable String displayName); @JsonProperty(BfConsts.PROP_FIELDS) void setFields(@Nullable Map<String, Field> fields); @JsonProperty(BfConsts.PROP_LONG_DESCRIPTION) void setLongDescription(String longDescription); @JsonProperty(BfConsts.PROP_MIN_ELEMENTS) void setMinElements(Integer minElements); @JsonProperty(BfConsts.PROP_MIN_LENGTH) void setMinLength(Integer minLength); @JsonProperty(BfConsts.PROP_OPTIONAL) void setOptional(boolean optional); @JsonProperty(BfConsts.PROP_TYPE) void setType(Variable.Type type); @JsonProperty(BfConsts.PROP_VALUE) void setValue(JsonNode value); @JsonProperty(BfConsts.PROP_VALUES) void setValues(List<AllowedValue> values); }
Variable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Variable variable = (Variable) o; return _optional == variable._optional && Objects.equals(_description, variable._description) && Objects.equals(_displayName, variable._displayName) && Objects.equals(_fields, variable._fields) && Objects.equals(_longDescription, variable._longDescription) && Objects.equals(_minElements, variable._minElements) && Objects.equals(_minLength, variable._minLength) && _type == variable._type && Objects.equals(_value, variable._value) && Objects.equals(_values, variable._values); } Variable(); @JsonProperty(BfConsts.PROP_ALLOWED_VALUES) @Deprecated SortedSet<String> getAllowedValues(); @JsonProperty(BfConsts.PROP_DESCRIPTION) String getDescription(); @JsonProperty(BfConsts.PROP_DISPLAY_NAME) @Nullable String getDisplayName(); @JsonProperty(BfConsts.PROP_FIELDS) @Nullable Map<String, Field> getFields(); @JsonProperty(BfConsts.PROP_LONG_DESCRIPTION) String getLongDescription(); @JsonProperty(BfConsts.PROP_MIN_ELEMENTS) Integer getMinElements(); @JsonProperty(BfConsts.PROP_MIN_LENGTH) Integer getMinLength(); @JsonProperty(BfConsts.PROP_OPTIONAL) boolean getOptional(); @JsonProperty(BfConsts.PROP_TYPE) Variable.Type getType(); @Override boolean equals(Object o); @Override int hashCode(); @JsonProperty(BfConsts.PROP_VALUE) @JsonInclude(Include.NON_NULL) JsonNode getValue(); @JsonProperty(BfConsts.PROP_VALUES) List<AllowedValue> getValues(); @JsonProperty(BfConsts.PROP_ALLOWED_VALUES) @Deprecated void setAllowedValues(SortedSet<String> allowedValues); @JsonProperty(BfConsts.PROP_DESCRIPTION) void setDescription(String description); @JsonProperty(BfConsts.PROP_DISPLAY_NAME) void setDisplayName(@Nullable String displayName); @JsonProperty(BfConsts.PROP_FIELDS) void setFields(@Nullable Map<String, Field> fields); @JsonProperty(BfConsts.PROP_LONG_DESCRIPTION) void setLongDescription(String longDescription); @JsonProperty(BfConsts.PROP_MIN_ELEMENTS) void setMinElements(Integer minElements); @JsonProperty(BfConsts.PROP_MIN_LENGTH) void setMinLength(Integer minLength); @JsonProperty(BfConsts.PROP_OPTIONAL) void setOptional(boolean optional); @JsonProperty(BfConsts.PROP_TYPE) void setType(Variable.Type type); @JsonProperty(BfConsts.PROP_VALUE) void setValue(JsonNode value); @JsonProperty(BfConsts.PROP_VALUES) void setValues(List<AllowedValue> values);  }