Java Code Examples for java.lang.Float#compare()

The following examples show how to use java.lang.Float#compare() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataBindingModelWithAllFieldTypesNoValidation_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
protected void setDataBindingVariables(ViewDataBinding binding, EpoxyModel previousModel) {
  if (!(previousModel instanceof DataBindingModelWithAllFieldTypesNoValidation_)) {
    setDataBindingVariables(binding);
    return;
  }
  DataBindingModelWithAllFieldTypesNoValidation_ that = (DataBindingModelWithAllFieldTypesNoValidation_) previousModel;
  if ((valueInt != that.valueInt)) {
    binding.setVariable(BR.valueInt, valueInt);
  }
  if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) {
    binding.setVariable(BR.valueInteger, valueInteger);
  }
  if ((valueShort != that.valueShort)) {
    binding.setVariable(BR.valueShort, valueShort);
  }
  if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) {
    binding.setVariable(BR.valueShortWrapper, valueShortWrapper);
  }
  if ((valueChar != that.valueChar)) {
    binding.setVariable(BR.valueChar, valueChar);
  }
  if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) {
    binding.setVariable(BR.valueCharacter, valueCharacter);
  }
  if ((valuebByte != that.valuebByte)) {
    binding.setVariable(BR.valuebByte, valuebByte);
  }
  if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) {
    binding.setVariable(BR.valueByteWrapper, valueByteWrapper);
  }
  if ((valueLong != that.valueLong)) {
    binding.setVariable(BR.valueLong, valueLong);
  }
  if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) {
    binding.setVariable(BR.valueLongWrapper, valueLongWrapper);
  }
  if ((Double.compare(that.valueDouble, valueDouble) != 0)) {
    binding.setVariable(BR.valueDouble, valueDouble);
  }
  if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) {
    binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper);
  }
  if ((Float.compare(that.valueFloat, valueFloat) != 0)) {
    binding.setVariable(BR.valueFloat, valueFloat);
  }
  if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) {
    binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper);
  }
  if ((valueBoolean != that.valueBoolean)) {
    binding.setVariable(BR.valueBoolean, valueBoolean);
  }
  if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) {
    binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper);
  }
  if (!Arrays.equals(valueIntArray, that.valueIntArray)) {
    binding.setVariable(BR.valueIntArray, valueIntArray);
  }
  if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) {
    binding.setVariable(BR.valueObjectArray, valueObjectArray);
  }
  if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) {
    binding.setVariable(BR.valueString, valueString);
  }
  if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) {
    binding.setVariable(BR.valueObject, valueObject);
  }
  if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) {
    binding.setVariable(BR.valueList, valueList);
  }
}
 
Example 2
Source File: DataBindingModelWithAllFieldTypesNoValidation_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (!(o instanceof DataBindingModelWithAllFieldTypesNoValidation_)) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataBindingModelWithAllFieldTypesNoValidation_ that = (DataBindingModelWithAllFieldTypesNoValidation_) o;
  if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if ((valueInt != that.valueInt)) {
    return false;
  }
  if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) {
    return false;
  }
  if ((valueShort != that.valueShort)) {
    return false;
  }
  if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) {
    return false;
  }
  if ((valueChar != that.valueChar)) {
    return false;
  }
  if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) {
    return false;
  }
  if ((valuebByte != that.valuebByte)) {
    return false;
  }
  if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) {
    return false;
  }
  if ((valueLong != that.valueLong)) {
    return false;
  }
  if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) {
    return false;
  }
  if ((Double.compare(that.valueDouble, valueDouble) != 0)) {
    return false;
  }
  if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) {
    return false;
  }
  if ((Float.compare(that.valueFloat, valueFloat) != 0)) {
    return false;
  }
  if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) {
    return false;
  }
  if ((valueBoolean != that.valueBoolean)) {
    return false;
  }
  if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) {
    return false;
  }
  if (!Arrays.equals(valueIntArray, that.valueIntArray)) {
    return false;
  }
  if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) {
    return false;
  }
  if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) {
    return false;
  }
  if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) {
    return false;
  }
  if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) {
    return false;
  }
  return true;
}
 
Example 3
Source File: ModelWithAllFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (!(o instanceof ModelWithAllFieldTypes_)) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  ModelWithAllFieldTypes_ that = (ModelWithAllFieldTypes_) o;
  if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if ((valueInt != that.valueInt)) {
    return false;
  }
  if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) {
    return false;
  }
  if ((valueShort != that.valueShort)) {
    return false;
  }
  if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) {
    return false;
  }
  if ((valueChar != that.valueChar)) {
    return false;
  }
  if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) {
    return false;
  }
  if ((valuebByte != that.valuebByte)) {
    return false;
  }
  if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) {
    return false;
  }
  if ((valueLong != that.valueLong)) {
    return false;
  }
  if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) {
    return false;
  }
  if ((Double.compare(that.valueDouble, valueDouble) != 0)) {
    return false;
  }
  if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) {
    return false;
  }
  if ((Float.compare(that.valueFloat, valueFloat) != 0)) {
    return false;
  }
  if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) {
    return false;
  }
  if ((valueBoolean != that.valueBoolean)) {
    return false;
  }
  if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) {
    return false;
  }
  if (!Arrays.equals(valueIntArray, that.valueIntArray)) {
    return false;
  }
  if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) {
    return false;
  }
  if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) {
    return false;
  }
  if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) {
    return false;
  }
  if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) {
    return false;
  }
  return true;
}
 
Example 4
Source File: DataBindingModelWithAllFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
protected void setDataBindingVariables(ViewDataBinding binding, EpoxyModel previousModel) {
  if (!(previousModel instanceof DataBindingModelWithAllFieldTypes_)) {
    setDataBindingVariables(binding);
    return;
  }
  DataBindingModelWithAllFieldTypes_ that = (DataBindingModelWithAllFieldTypes_) previousModel;
  if ((valueInt != that.valueInt)) {
    binding.setVariable(BR.valueInt, valueInt);
  }
  if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) {
    binding.setVariable(BR.valueInteger, valueInteger);
  }
  if ((valueShort != that.valueShort)) {
    binding.setVariable(BR.valueShort, valueShort);
  }
  if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) {
    binding.setVariable(BR.valueShortWrapper, valueShortWrapper);
  }
  if ((valueChar != that.valueChar)) {
    binding.setVariable(BR.valueChar, valueChar);
  }
  if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) {
    binding.setVariable(BR.valueCharacter, valueCharacter);
  }
  if ((valuebByte != that.valuebByte)) {
    binding.setVariable(BR.valuebByte, valuebByte);
  }
  if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) {
    binding.setVariable(BR.valueByteWrapper, valueByteWrapper);
  }
  if ((valueLong != that.valueLong)) {
    binding.setVariable(BR.valueLong, valueLong);
  }
  if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) {
    binding.setVariable(BR.valueLongWrapper, valueLongWrapper);
  }
  if ((Double.compare(that.valueDouble, valueDouble) != 0)) {
    binding.setVariable(BR.valueDouble, valueDouble);
  }
  if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) {
    binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper);
  }
  if ((Float.compare(that.valueFloat, valueFloat) != 0)) {
    binding.setVariable(BR.valueFloat, valueFloat);
  }
  if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) {
    binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper);
  }
  if ((valueBoolean != that.valueBoolean)) {
    binding.setVariable(BR.valueBoolean, valueBoolean);
  }
  if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) {
    binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper);
  }
  if (!Arrays.equals(valueIntArray, that.valueIntArray)) {
    binding.setVariable(BR.valueIntArray, valueIntArray);
  }
  if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) {
    binding.setVariable(BR.valueObjectArray, valueObjectArray);
  }
  if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) {
    binding.setVariable(BR.valueString, valueString);
  }
  if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) {
    binding.setVariable(BR.valueObject, valueObject);
  }
  if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) {
    binding.setVariable(BR.valueList, valueList);
  }
}
 
Example 5
Source File: DataBindingModelWithAllFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (!(o instanceof DataBindingModelWithAllFieldTypes_)) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataBindingModelWithAllFieldTypes_ that = (DataBindingModelWithAllFieldTypes_) o;
  if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if ((valueInt != that.valueInt)) {
    return false;
  }
  if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) {
    return false;
  }
  if ((valueShort != that.valueShort)) {
    return false;
  }
  if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) {
    return false;
  }
  if ((valueChar != that.valueChar)) {
    return false;
  }
  if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) {
    return false;
  }
  if ((valuebByte != that.valuebByte)) {
    return false;
  }
  if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) {
    return false;
  }
  if ((valueLong != that.valueLong)) {
    return false;
  }
  if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) {
    return false;
  }
  if ((Double.compare(that.valueDouble, valueDouble) != 0)) {
    return false;
  }
  if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) {
    return false;
  }
  if ((Float.compare(that.valueFloat, valueFloat) != 0)) {
    return false;
  }
  if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) {
    return false;
  }
  if ((valueBoolean != that.valueBoolean)) {
    return false;
  }
  if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) {
    return false;
  }
  if (!Arrays.equals(valueIntArray, that.valueIntArray)) {
    return false;
  }
  if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) {
    return false;
  }
  if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) {
    return false;
  }
  if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) {
    return false;
  }
  if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) {
    return false;
  }
  return true;
}
 
Example 6
Source File: ModelWithAllPrivateFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (!(o instanceof ModelWithAllPrivateFieldTypes_)) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  ModelWithAllPrivateFieldTypes_ that = (ModelWithAllPrivateFieldTypes_) o;
  if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) {
    return false;
  }
  if ((getValueInt() != that.getValueInt())) {
    return false;
  }
  if ((getValueInteger() != null ? !getValueInteger().equals(that.getValueInteger()) : that.getValueInteger() != null)) {
    return false;
  }
  if ((getValueShort() != that.getValueShort())) {
    return false;
  }
  if ((getValueShortWrapper() != null ? !getValueShortWrapper().equals(that.getValueShortWrapper()) : that.getValueShortWrapper() != null)) {
    return false;
  }
  if ((getValueChar() != that.getValueChar())) {
    return false;
  }
  if ((getValueCharacter() != null ? !getValueCharacter().equals(that.getValueCharacter()) : that.getValueCharacter() != null)) {
    return false;
  }
  if ((getValuebByte() != that.getValuebByte())) {
    return false;
  }
  if ((getValueByteWrapper() != null ? !getValueByteWrapper().equals(that.getValueByteWrapper()) : that.getValueByteWrapper() != null)) {
    return false;
  }
  if ((getValueLong() != that.getValueLong())) {
    return false;
  }
  if ((getValueLongWrapper() != null ? !getValueLongWrapper().equals(that.getValueLongWrapper()) : that.getValueLongWrapper() != null)) {
    return false;
  }
  if ((Double.compare(that.getValueDouble(), getValueDouble()) != 0)) {
    return false;
  }
  if ((getValueDoubleWrapper() != null ? !getValueDoubleWrapper().equals(that.getValueDoubleWrapper()) : that.getValueDoubleWrapper() != null)) {
    return false;
  }
  if ((Float.compare(that.getValueFloat(), getValueFloat()) != 0)) {
    return false;
  }
  if ((getValueFloatWrapper() != null ? !getValueFloatWrapper().equals(that.getValueFloatWrapper()) : that.getValueFloatWrapper() != null)) {
    return false;
  }
  if ((isValueBoolean() != that.isValueBoolean())) {
    return false;
  }
  if ((getValueBooleanWrapper() != null ? !getValueBooleanWrapper().equals(that.getValueBooleanWrapper()) : that.getValueBooleanWrapper() != null)) {
    return false;
  }
  if (!Arrays.equals(getValueIntArray(), that.getValueIntArray())) {
    return false;
  }
  if (!Arrays.equals(getValueObjectArray(), that.getValueObjectArray())) {
    return false;
  }
  if ((getValueString() != null ? !getValueString().equals(that.getValueString()) : that.getValueString() != null)) {
    return false;
  }
  if ((getValueObject() != null ? !getValueObject().equals(that.getValueObject()) : that.getValueObject() != null)) {
    return false;
  }
  if ((getValueList() != null ? !getValueList().equals(that.getValueList()) : that.getValueList() != null)) {
    return false;
  }
  return true;
}