index int64 0 0 | repo_id stringlengths 26 205 | file_path stringlengths 51 246 | content stringlengths 8 433k | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/CustomPackageLayoutPatternViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class CustomPackageLayoutPatternViewModel_ extends EpoxyModel<CustomPackageLayoutPatternView> implements GeneratedModel<CustomPackageLayoutPatternView>, CustomPackageLayoutPatternViewModelBuilder {
private OnModelBoundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final CustomPackageLayoutPatternView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final CustomPackageLayoutPatternView object) {
super.bind(object);
}
@Override
public void bind(final CustomPackageLayoutPatternView object, EpoxyModel previousModel) {
if (!(previousModel instanceof CustomPackageLayoutPatternViewModel_)) {
bind(object);
return;
}
CustomPackageLayoutPatternViewModel_ that = (CustomPackageLayoutPatternViewModel_) previousModel;
super.bind(object);
}
@Override
public void handlePostBind(final CustomPackageLayoutPatternView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public CustomPackageLayoutPatternViewModel_ onBind(
OnModelBoundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(CustomPackageLayoutPatternView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public CustomPackageLayoutPatternViewModel_ onUnbind(
OnModelUnboundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final CustomPackageLayoutPatternView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public CustomPackageLayoutPatternViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final CustomPackageLayoutPatternView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public CustomPackageLayoutPatternViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ show() {
super.show();
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public CustomPackageLayoutPatternViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.hello_custom_package_layout_pattern_view_me;
}
@Override
public CustomPackageLayoutPatternViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof CustomPackageLayoutPatternViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
CustomPackageLayoutPatternViewModel_ that = (CustomPackageLayoutPatternViewModel_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "CustomPackageLayoutPatternViewModel_{" +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,700 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestCallbackPropViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class TestCallbackPropViewModel_ extends EpoxyModel<TestCallbackPropView> implements GeneratedModel<TestCallbackPropView>, TestCallbackPropViewModelBuilder {
private OnModelBoundListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private View.OnClickListener listener_OnClickListener = (View.OnClickListener) null;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestCallbackPropView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestCallbackPropView object) {
super.bind(object);
object.setListener(listener_OnClickListener);
}
@Override
public void bind(final TestCallbackPropView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestCallbackPropViewModel_)) {
bind(object);
return;
}
TestCallbackPropViewModel_ that = (TestCallbackPropViewModel_) previousModel;
super.bind(object);
if (((listener_OnClickListener == null) != (that.listener_OnClickListener == null))) {
object.setListener(listener_OnClickListener);
}
}
@Override
public void handlePostBind(final TestCallbackPropView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestCallbackPropViewModel_ onBind(
OnModelBoundListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestCallbackPropView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.setListener((View.OnClickListener) null);
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestCallbackPropViewModel_ onUnbind(
OnModelUnboundListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestCallbackPropView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestCallbackPropViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestCallbackPropView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestCallbackPropViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestCallbackPropViewModel_ listener(
@Nullable final OnModelClickListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) {
onMutation();
if (listener == null) {
this.listener_OnClickListener = null;
}
else {
this.listener_OnClickListener = new WrappedEpoxyModelClickListener<>(listener);
}
return this;
}
/**
* <i>Optional</i>: Default value is (View.OnClickListener) null
*
* @see TestCallbackPropView#setListener(View.OnClickListener)
*/
public TestCallbackPropViewModel_ listener(@Nullable View.OnClickListener listener) {
onMutation();
this.listener_OnClickListener = listener;
return this;
}
@Nullable
public View.OnClickListener listener() {
return listener_OnClickListener;
}
@Override
public TestCallbackPropViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestCallbackPropViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestCallbackPropViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestCallbackPropViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ show() {
super.show();
return this;
}
@Override
public TestCallbackPropViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestCallbackPropViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TestCallbackPropViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.listener_OnClickListener = (View.OnClickListener) null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestCallbackPropViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestCallbackPropViewModel_ that = (TestCallbackPropViewModel_) 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 (((listener_OnClickListener == null) != (that.listener_OnClickListener == null))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (listener_OnClickListener != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "TestCallbackPropViewModel_{" +
"listener_OnClickListener=" + listener_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,701 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GridSpanCountViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class GridSpanCountViewModel_ extends EpoxyModel<GridSpanCountView> implements GeneratedModel<GridSpanCountView>, GridSpanCountViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<GridSpanCountViewModel_, GridSpanCountView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GridSpanCountViewModel_, GridSpanCountView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GridSpanCountViewModel_, GridSpanCountView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GridSpanCountViewModel_, GridSpanCountView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final GridSpanCountView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final GridSpanCountView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final GridSpanCountView object, EpoxyModel previousModel) {
if (!(previousModel instanceof GridSpanCountViewModel_)) {
bind(object);
return;
}
GridSpanCountViewModel_ that = (GridSpanCountViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final GridSpanCountView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GridSpanCountViewModel_ onBind(
OnModelBoundListener<GridSpanCountViewModel_, GridSpanCountView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(GridSpanCountView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GridSpanCountViewModel_ onUnbind(
OnModelUnboundListener<GridSpanCountViewModel_, GridSpanCountView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final GridSpanCountView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GridSpanCountViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GridSpanCountViewModel_, GridSpanCountView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final GridSpanCountView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GridSpanCountViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<GridSpanCountViewModel_, GridSpanCountView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see GridSpanCountView#setClickListener(String)
*/
public GridSpanCountViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public GridSpanCountViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GridSpanCountViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GridSpanCountViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GridSpanCountViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GridSpanCountViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GridSpanCountViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GridSpanCountViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GridSpanCountViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GridSpanCountViewModel_ show() {
super.show();
return this;
}
@Override
public GridSpanCountViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GridSpanCountViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GridSpanCountViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GridSpanCountViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GridSpanCountViewModel_ that = (GridSpanCountViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "GridSpanCountViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
}
| 8,702 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestNullStringOverloadsViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class TestNullStringOverloadsViewModel_ extends EpoxyModel<TestNullStringOverloadsView> implements GeneratedModel<TestNullStringOverloadsView>, TestNullStringOverloadsViewModelBuilder {
private OnModelBoundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null);
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestNullStringOverloadsView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestNullStringOverloadsView object) {
super.bind(object);
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
@Override
public void bind(final TestNullStringOverloadsView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestNullStringOverloadsViewModel_)) {
bind(object);
return;
}
TestNullStringOverloadsViewModel_ that = (TestNullStringOverloadsViewModel_) previousModel;
super.bind(object);
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
}
@Override
public void handlePostBind(final TestNullStringOverloadsView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestNullStringOverloadsViewModel_ onBind(
OnModelBoundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestNullStringOverloadsView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestNullStringOverloadsViewModel_ onUnbind(
OnModelUnboundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestNullStringOverloadsView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestNullStringOverloadsViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestNullStringOverloadsView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestNullStringOverloadsViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Nullable
public CharSequence getTitle(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestNullStringOverloadsView#setTitle(CharSequence)
*/
public TestNullStringOverloadsViewModel_ title(@Nullable CharSequence title) {
onMutation();
title_StringAttributeData.setValue(title);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestNullStringOverloadsView#setTitle(CharSequence)
*/
public TestNullStringOverloadsViewModel_ title(@StringRes int stringRes) {
onMutation();
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestNullStringOverloadsView#setTitle(CharSequence)
*/
public TestNullStringOverloadsViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestNullStringOverloadsView#setTitle(CharSequence)
*/
public TestNullStringOverloadsViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ show() {
super.show();
return this;
}
@Override
public TestNullStringOverloadsViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestNullStringOverloadsViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TestNullStringOverloadsViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.title_StringAttributeData = new StringAttributeData((CharSequence) null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestNullStringOverloadsViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestNullStringOverloadsViewModel_ that = (TestNullStringOverloadsViewModel_) 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 ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestNullStringOverloadsViewModel_{" +
"title_StringAttributeData=" + title_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,703 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/OnViewRecycledViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class OnViewRecycledViewModel_ extends EpoxyModel<OnViewRecycledView> implements GeneratedModel<OnViewRecycledView>, OnViewRecycledViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private CharSequence title_CharSequence;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setTitle");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final OnViewRecycledView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final OnViewRecycledView object) {
super.bind(object);
object.setTitle(title_CharSequence);
}
@Override
public void bind(final OnViewRecycledView object, EpoxyModel previousModel) {
if (!(previousModel instanceof OnViewRecycledViewModel_)) {
bind(object);
return;
}
OnViewRecycledViewModel_ that = (OnViewRecycledViewModel_) previousModel;
super.bind(object);
if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
object.setTitle(title_CharSequence);
}
}
@Override
public void handlePostBind(final OnViewRecycledView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public OnViewRecycledViewModel_ onBind(
OnModelBoundListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(OnViewRecycledView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.onRecycled1();
object.onRecycled2();
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public OnViewRecycledViewModel_ onUnbind(
OnModelUnboundListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final OnViewRecycledView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public OnViewRecycledViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final OnViewRecycledView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public OnViewRecycledViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see OnViewRecycledView#setTitle(CharSequence)
*/
public OnViewRecycledViewModel_ title(@NonNull CharSequence title) {
if (title == null) {
throw new IllegalArgumentException("title cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.title_CharSequence = title;
return this;
}
@NonNull
public CharSequence title() {
return title_CharSequence;
}
@Override
public OnViewRecycledViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public OnViewRecycledViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public OnViewRecycledViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public OnViewRecycledViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ show() {
super.show();
return this;
}
@Override
public OnViewRecycledViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public OnViewRecycledViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public OnViewRecycledViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.title_CharSequence = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof OnViewRecycledViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
OnViewRecycledViewModel_ that = (OnViewRecycledViewModel_) 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 ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_CharSequence != null ? title_CharSequence.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "OnViewRecycledViewModel_{" +
"title_CharSequence=" + title_CharSequence +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,704 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAllFieldTypes_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.Boolean;
import java.lang.Byte;
import java.lang.CharSequence;
import java.lang.Character;
import java.lang.Double;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.Short;
import java.lang.String;
import java.util.Arrays;
import java.util.List;
/**
* Generated file. Do not modify!
*/
public class ModelWithAllFieldTypes_ extends ModelWithAllFieldTypes implements GeneratedModel<Object>, ModelWithAllFieldTypesBuilder {
private OnModelBoundListener<ModelWithAllFieldTypes_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithAllFieldTypes_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithAllFieldTypes_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAllFieldTypes_ onBind(
OnModelBoundListener<ModelWithAllFieldTypes_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAllFieldTypes_ onUnbind(
OnModelUnboundListener<ModelWithAllFieldTypes_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAllFieldTypes_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAllFieldTypes_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelWithAllFieldTypes_ valueInt(int valueInt) {
onMutation();
super.valueInt = valueInt;
return this;
}
public int valueInt() {
return valueInt;
}
public ModelWithAllFieldTypes_ valueInteger(Integer valueInteger) {
onMutation();
super.valueInteger = valueInteger;
return this;
}
public Integer valueInteger() {
return valueInteger;
}
public ModelWithAllFieldTypes_ valueShort(short valueShort) {
onMutation();
super.valueShort = valueShort;
return this;
}
public short valueShort() {
return valueShort;
}
public ModelWithAllFieldTypes_ valueShortWrapper(Short valueShortWrapper) {
onMutation();
super.valueShortWrapper = valueShortWrapper;
return this;
}
public Short valueShortWrapper() {
return valueShortWrapper;
}
public ModelWithAllFieldTypes_ valueChar(char valueChar) {
onMutation();
super.valueChar = valueChar;
return this;
}
public char valueChar() {
return valueChar;
}
public ModelWithAllFieldTypes_ valueCharacter(Character valueCharacter) {
onMutation();
super.valueCharacter = valueCharacter;
return this;
}
public Character valueCharacter() {
return valueCharacter;
}
public ModelWithAllFieldTypes_ valuebByte(byte valuebByte) {
onMutation();
super.valuebByte = valuebByte;
return this;
}
public byte valuebByte() {
return valuebByte;
}
public ModelWithAllFieldTypes_ valueByteWrapper(Byte valueByteWrapper) {
onMutation();
super.valueByteWrapper = valueByteWrapper;
return this;
}
public Byte valueByteWrapper() {
return valueByteWrapper;
}
public ModelWithAllFieldTypes_ valueLong(long valueLong) {
onMutation();
super.valueLong = valueLong;
return this;
}
public long valueLong() {
return valueLong;
}
public ModelWithAllFieldTypes_ valueLongWrapper(Long valueLongWrapper) {
onMutation();
super.valueLongWrapper = valueLongWrapper;
return this;
}
public Long valueLongWrapper() {
return valueLongWrapper;
}
public ModelWithAllFieldTypes_ valueDouble(double valueDouble) {
onMutation();
super.valueDouble = valueDouble;
return this;
}
public double valueDouble() {
return valueDouble;
}
public ModelWithAllFieldTypes_ valueDoubleWrapper(Double valueDoubleWrapper) {
onMutation();
super.valueDoubleWrapper = valueDoubleWrapper;
return this;
}
public Double valueDoubleWrapper() {
return valueDoubleWrapper;
}
public ModelWithAllFieldTypes_ valueFloat(float valueFloat) {
onMutation();
super.valueFloat = valueFloat;
return this;
}
public float valueFloat() {
return valueFloat;
}
public ModelWithAllFieldTypes_ valueFloatWrapper(Float valueFloatWrapper) {
onMutation();
super.valueFloatWrapper = valueFloatWrapper;
return this;
}
public Float valueFloatWrapper() {
return valueFloatWrapper;
}
public ModelWithAllFieldTypes_ valueBoolean(boolean valueBoolean) {
onMutation();
super.valueBoolean = valueBoolean;
return this;
}
public boolean valueBoolean() {
return valueBoolean;
}
public ModelWithAllFieldTypes_ valueBooleanWrapper(Boolean valueBooleanWrapper) {
onMutation();
super.valueBooleanWrapper = valueBooleanWrapper;
return this;
}
public Boolean valueBooleanWrapper() {
return valueBooleanWrapper;
}
public ModelWithAllFieldTypes_ valueIntArray(int[] valueIntArray) {
onMutation();
super.valueIntArray = valueIntArray;
return this;
}
public int[] valueIntArray() {
return valueIntArray;
}
public ModelWithAllFieldTypes_ valueObjectArray(Object[] valueObjectArray) {
onMutation();
super.valueObjectArray = valueObjectArray;
return this;
}
public Object[] valueObjectArray() {
return valueObjectArray;
}
public ModelWithAllFieldTypes_ valueString(String valueString) {
onMutation();
super.valueString = valueString;
return this;
}
public String valueString() {
return valueString;
}
public ModelWithAllFieldTypes_ valueObject(Object valueObject) {
onMutation();
super.valueObject = valueObject;
return this;
}
public Object valueObject() {
return valueObject;
}
public ModelWithAllFieldTypes_ valueList(List<String> valueList) {
onMutation();
super.valueList = valueList;
return this;
}
public List<String> valueList() {
return valueList;
}
@Override
public ModelWithAllFieldTypes_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAllFieldTypes_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAllFieldTypes_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAllFieldTypes_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ show() {
super.show();
return this;
}
@Override
public ModelWithAllFieldTypes_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithAllFieldTypes_ hide() {
super.hide();
return this;
}
@Override
public ModelWithAllFieldTypes_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.valueInt = 0;
super.valueInteger = null;
super.valueShort = (short) 0;
super.valueShortWrapper = null;
super.valueChar = (char) 0;
super.valueCharacter = null;
super.valuebByte = (byte) 0;
super.valueByteWrapper = null;
super.valueLong = 0L;
super.valueLongWrapper = null;
super.valueDouble = 0.0d;
super.valueDoubleWrapper = null;
super.valueFloat = 0.0f;
super.valueFloatWrapper = null;
super.valueBoolean = false;
super.valueBooleanWrapper = null;
super.valueIntArray = null;
super.valueObjectArray = null;
super.valueString = null;
super.valueObject = null;
super.valueList = null;
super.reset();
return this;
}
@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;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
long temp;
_result = 31 * _result + valueInt;
_result = 31 * _result + (valueInteger != null ? valueInteger.hashCode() : 0);
_result = 31 * _result + valueShort;
_result = 31 * _result + (valueShortWrapper != null ? valueShortWrapper.hashCode() : 0);
_result = 31 * _result + valueChar;
_result = 31 * _result + (valueCharacter != null ? valueCharacter.hashCode() : 0);
_result = 31 * _result + valuebByte;
_result = 31 * _result + (valueByteWrapper != null ? valueByteWrapper.hashCode() : 0);
_result = 31 * _result + (int) (valueLong ^ (valueLong >>> 32));
_result = 31 * _result + (valueLongWrapper != null ? valueLongWrapper.hashCode() : 0);
temp = Double.doubleToLongBits(valueDouble);
_result = 31 * _result + (int) (temp ^ (temp >>> 32));
_result = 31 * _result + (valueDoubleWrapper != null ? valueDoubleWrapper.hashCode() : 0);
_result = 31 * _result + (valueFloat != +0.0f ? Float.floatToIntBits(valueFloat) : 0);
_result = 31 * _result + (valueFloatWrapper != null ? valueFloatWrapper.hashCode() : 0);
_result = 31 * _result + (valueBoolean ? 1 : 0);
_result = 31 * _result + (valueBooleanWrapper != null ? valueBooleanWrapper.hashCode() : 0);
_result = 31 * _result + Arrays.hashCode(valueIntArray);
_result = 31 * _result + Arrays.hashCode(valueObjectArray);
_result = 31 * _result + (valueString != null ? valueString.hashCode() : 0);
_result = 31 * _result + (valueObject != null ? valueObject.hashCode() : 0);
_result = 31 * _result + (valueList != null ? valueList.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "ModelWithAllFieldTypes_{" +
"valueInt=" + valueInt +
", valueInteger=" + valueInteger +
", valueShort=" + valueShort +
", valueShortWrapper=" + valueShortWrapper +
", valueChar=" + valueChar +
", valueCharacter=" + valueCharacter +
", valuebByte=" + valuebByte +
", valueByteWrapper=" + valueByteWrapper +
", valueLong=" + valueLong +
", valueLongWrapper=" + valueLongWrapper +
", valueDouble=" + valueDouble +
", valueDoubleWrapper=" + valueDoubleWrapper +
", valueFloat=" + valueFloat +
", valueFloatWrapper=" + valueFloatWrapper +
", valueBoolean=" + valueBoolean +
", valueBooleanWrapper=" + valueBooleanWrapper +
", valueIntArray=" + valueIntArray +
", valueObjectArray=" + valueObjectArray +
", valueString=" + valueString +
", valueObject=" + valueObject +
", valueList=" + valueList +
"}" + super.toString();
}
}
| 8,705 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithoutSetter_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithoutSetter_ extends ModelWithoutSetter implements GeneratedModel<Object>, ModelWithoutSetterBuilder {
private OnModelBoundListener<ModelWithoutSetter_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithoutSetter_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithoutSetter_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithoutSetter_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithoutSetter_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithoutSetter_ onBind(OnModelBoundListener<ModelWithoutSetter_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithoutSetter_ onUnbind(
OnModelUnboundListener<ModelWithoutSetter_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithoutSetter_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithoutSetter_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithoutSetter_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithoutSetter_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public int value() {
return value;
}
@Override
public ModelWithoutSetter_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithoutSetter_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithoutSetter_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithoutSetter_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithoutSetter_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithoutSetter_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithoutSetter_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithoutSetter_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithoutSetter_ show() {
super.show();
return this;
}
@Override
public ModelWithoutSetter_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithoutSetter_ hide() {
super.hide();
return this;
}
@Override
public ModelWithoutSetter_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithoutSetter_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithoutSetter_ that = (ModelWithoutSetter_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "ModelWithoutSetter_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,706 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethodParentLayout$NoLayout_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GenerateDefaultLayoutMethodParentLayout$NoLayout_ extends GenerateDefaultLayoutMethodParentLayout.NoLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodParentLayout_NoLayoutBuilder {
private OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public GenerateDefaultLayoutMethodParentLayout$NoLayout_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onBind(
OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onUnbind(
OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onVisibilityChanged(
OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ show() {
super.show();
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$NoLayout_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenerateDefaultLayoutMethodParentLayout$NoLayout_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GenerateDefaultLayoutMethodParentLayout$NoLayout_ that = (GenerateDefaultLayoutMethodParentLayout$NoLayout_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "GenerateDefaultLayoutMethodParentLayout$NoLayout_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,707 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/SavedStateViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class SavedStateViewModel_ extends EpoxyModel<SavedStateView> implements GeneratedModel<SavedStateView>, SavedStateViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<SavedStateViewModel_, SavedStateView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SavedStateViewModel_, SavedStateView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SavedStateViewModel_, SavedStateView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SavedStateViewModel_, SavedStateView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SavedStateView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SavedStateView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final SavedStateView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SavedStateViewModel_)) {
bind(object);
return;
}
SavedStateViewModel_ that = (SavedStateViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final SavedStateView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SavedStateViewModel_ onBind(
OnModelBoundListener<SavedStateViewModel_, SavedStateView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SavedStateView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SavedStateViewModel_ onUnbind(
OnModelUnboundListener<SavedStateViewModel_, SavedStateView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SavedStateView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SavedStateViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SavedStateViewModel_, SavedStateView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SavedStateView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SavedStateViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SavedStateViewModel_, SavedStateView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see SavedStateView#setClickListener(String)
*/
public SavedStateViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public SavedStateViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SavedStateViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SavedStateViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SavedStateViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SavedStateViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SavedStateViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SavedStateViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public SavedStateViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SavedStateViewModel_ show() {
super.show();
return this;
}
@Override
public SavedStateViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SavedStateViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public SavedStateViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SavedStateViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SavedStateViewModel_ that = (SavedStateViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SavedStateViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public boolean shouldSaveViewState() {
return true;
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,708 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/NullOnRecycleViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class NullOnRecycleViewModel_ extends EpoxyModel<NullOnRecycleView> implements GeneratedModel<NullOnRecycleView>, NullOnRecycleViewModelBuilder {
private OnModelBoundListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private CharSequence title_CharSequence = (CharSequence) null;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final NullOnRecycleView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final NullOnRecycleView object) {
super.bind(object);
object.setTitle(title_CharSequence);
}
@Override
public void bind(final NullOnRecycleView object, EpoxyModel previousModel) {
if (!(previousModel instanceof NullOnRecycleViewModel_)) {
bind(object);
return;
}
NullOnRecycleViewModel_ that = (NullOnRecycleViewModel_) previousModel;
super.bind(object);
if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
object.setTitle(title_CharSequence);
}
}
@Override
public void handlePostBind(final NullOnRecycleView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public NullOnRecycleViewModel_ onBind(
OnModelBoundListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(NullOnRecycleView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.setTitle((CharSequence) null);
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public NullOnRecycleViewModel_ onUnbind(
OnModelUnboundListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final NullOnRecycleView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public NullOnRecycleViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final NullOnRecycleView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public NullOnRecycleViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see NullOnRecycleView#setTitle(CharSequence)
*/
public NullOnRecycleViewModel_ title(@Nullable CharSequence title) {
onMutation();
this.title_CharSequence = title;
return this;
}
@Nullable
public CharSequence title() {
return title_CharSequence;
}
@Override
public NullOnRecycleViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public NullOnRecycleViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public NullOnRecycleViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public NullOnRecycleViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ show() {
super.show();
return this;
}
@Override
public NullOnRecycleViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public NullOnRecycleViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public NullOnRecycleViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.title_CharSequence = (CharSequence) null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof NullOnRecycleViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
NullOnRecycleViewModel_ that = (NullOnRecycleViewModel_) 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 ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_CharSequence != null ? title_CharSequence.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "NullOnRecycleViewModel_{" +
"title_CharSequence=" + title_CharSequence +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,709 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithSuperAttributes$SubModelWithSuperAttributes_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithSuperAttributes$SubModelWithSuperAttributes_ extends ModelWithSuperAttributes.SubModelWithSuperAttributes implements GeneratedModel<Object>, ModelWithSuperAttributes_SubModelWithSuperAttributesBuilder {
private OnModelBoundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithSuperAttributes$SubModelWithSuperAttributes_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onBind(
OnModelBoundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onUnbind(
OnModelUnboundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ subValue(int subValue) {
onMutation();
super.subValue = subValue;
return this;
}
public int subValue() {
return subValue;
}
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ superValue(int superValue) {
onMutation();
super.superValue = superValue;
return this;
}
public int superValue() {
return superValue;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence p0,
long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ show() {
super.show();
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ hide() {
super.hide();
return this;
}
@Override
public ModelWithSuperAttributes$SubModelWithSuperAttributes_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.subValue = 0;
super.superValue = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithSuperAttributes$SubModelWithSuperAttributes_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithSuperAttributes$SubModelWithSuperAttributes_ that = (ModelWithSuperAttributes$SubModelWithSuperAttributes_) 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 ((subValue != that.subValue)) {
return false;
}
if ((superValue != that.superValue)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + subValue;
_result = 31 * _result + superValue;
return _result;
}
@Override
public String toString() {
return "ModelWithSuperAttributes$SubModelWithSuperAttributes_{" +
"subValue=" + subValue +
", superValue=" + superValue +
"}" + super.toString();
}
}
| 8,710 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestTextPropViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class TestTextPropViewModel_ extends EpoxyModel<TestTextPropView> implements GeneratedModel<TestTextPropView>, TestTextPropViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<TestTextPropViewModel_, TestTextPropView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestTextPropViewModel_, TestTextPropView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestTextPropViewModel_, TestTextPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestTextPropViewModel_, TestTextPropView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
private StringAttributeData title_StringAttributeData = new StringAttributeData();
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setTitle");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestTextPropView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestTextPropView object) {
super.bind(object);
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
@Override
public void bind(final TestTextPropView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestTextPropViewModel_)) {
bind(object);
return;
}
TestTextPropViewModel_ that = (TestTextPropViewModel_) previousModel;
super.bind(object);
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
}
@Override
public void handlePostBind(final TestTextPropView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestTextPropViewModel_ onBind(
OnModelBoundListener<TestTextPropViewModel_, TestTextPropView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestTextPropView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestTextPropViewModel_ onUnbind(
OnModelUnboundListener<TestTextPropViewModel_, TestTextPropView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestTextPropView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestTextPropViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestTextPropViewModel_, TestTextPropView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestTextPropView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestTextPropViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestTextPropViewModel_, TestTextPropView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public CharSequence getTitle(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Required.</i>
*
* @see TestTextPropView#setTitle(CharSequence)
*/
public TestTextPropViewModel_ title(@NonNull CharSequence title) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
if (title == null) {
throw new IllegalArgumentException("title cannot be null");
}
title_StringAttributeData.setValue(title);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestTextPropView#setTitle(CharSequence)
*/
public TestTextPropViewModel_ title(@StringRes int stringRes) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestTextPropView#setTitle(CharSequence)
*/
public TestTextPropViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestTextPropView#setTitle(CharSequence)
*/
public TestTextPropViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestTextPropViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestTextPropViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestTextPropViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestTextPropViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestTextPropViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestTextPropViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestTextPropViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TestTextPropViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestTextPropViewModel_ show() {
super.show();
return this;
}
@Override
public TestTextPropViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestTextPropViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TestTextPropViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.title_StringAttributeData = new StringAttributeData();
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestTextPropViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestTextPropViewModel_ that = (TestTextPropViewModel_) 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 ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestTextPropViewModel_{" +
"title_StringAttributeData=" + title_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,711 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GeneratedModelSuffixViewSuffix_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GeneratedModelSuffixViewSuffix_ extends EpoxyModel<GeneratedModelSuffixView> implements GeneratedModel<GeneratedModelSuffixView>, GeneratedModelSuffixViewSuffixBuilder {
private OnModelBoundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final GeneratedModelSuffixView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final GeneratedModelSuffixView object) {
super.bind(object);
}
@Override
public void bind(final GeneratedModelSuffixView object, EpoxyModel previousModel) {
if (!(previousModel instanceof GeneratedModelSuffixViewSuffix_)) {
bind(object);
return;
}
GeneratedModelSuffixViewSuffix_ that = (GeneratedModelSuffixViewSuffix_) previousModel;
super.bind(object);
}
@Override
public void handlePostBind(final GeneratedModelSuffixView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GeneratedModelSuffixViewSuffix_ onBind(
OnModelBoundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(GeneratedModelSuffixView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GeneratedModelSuffixViewSuffix_ onUnbind(
OnModelUnboundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final GeneratedModelSuffixView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GeneratedModelSuffixViewSuffix_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final GeneratedModelSuffixView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GeneratedModelSuffixViewSuffix_ onVisibilityChanged(
OnModelVisibilityChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ show() {
super.show();
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GeneratedModelSuffixViewSuffix_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.generated_model_suffix_view;
}
@Override
public GeneratedModelSuffixViewSuffix_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GeneratedModelSuffixViewSuffix_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GeneratedModelSuffixViewSuffix_ that = (GeneratedModelSuffixViewSuffix_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "GeneratedModelSuffixViewSuffix_{" +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,712 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/AutoLayoutModelViewManualLayoutParamsModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.NullPointerException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class AutoLayoutModelViewManualLayoutParamsModel_ extends EpoxyModel<AutoLayoutModelViewManualLayoutParams> implements GeneratedModel<AutoLayoutModelViewManualLayoutParams>, AutoLayoutModelViewManualLayoutParamsModelBuilder {
private OnModelBoundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public AutoLayoutModelViewManualLayoutParams buildView(ViewGroup parent) {
AutoLayoutModelViewManualLayoutParams v = new AutoLayoutModelViewManualLayoutParams(parent.getContext());
if (v.getLayoutParams() == null) {
throw new NullPointerException("Layout params is required to be set for Size.MANUAL");
}
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final AutoLayoutModelViewManualLayoutParams object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final AutoLayoutModelViewManualLayoutParams object) {
super.bind(object);
object.setValue(value_Int);
}
@Override
public void bind(final AutoLayoutModelViewManualLayoutParams object, EpoxyModel previousModel) {
if (!(previousModel instanceof AutoLayoutModelViewManualLayoutParamsModel_)) {
bind(object);
return;
}
AutoLayoutModelViewManualLayoutParamsModel_ that = (AutoLayoutModelViewManualLayoutParamsModel_) previousModel;
super.bind(object);
if ((value_Int != that.value_Int)) {
object.setValue(value_Int);
}
}
@Override
public void handlePostBind(final AutoLayoutModelViewManualLayoutParams object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewManualLayoutParamsModel_ onBind(
OnModelBoundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(AutoLayoutModelViewManualLayoutParams object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewManualLayoutParamsModel_ onUnbind(
OnModelUnboundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final AutoLayoutModelViewManualLayoutParams object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewManualLayoutParamsModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final AutoLayoutModelViewManualLayoutParams object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewManualLayoutParamsModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see AutoLayoutModelViewManualLayoutParams#setValue(int)
*/
public AutoLayoutModelViewManualLayoutParamsModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ show() {
super.show();
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public AutoLayoutModelViewManualLayoutParamsModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AutoLayoutModelViewManualLayoutParamsModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AutoLayoutModelViewManualLayoutParamsModel_ that = (AutoLayoutModelViewManualLayoutParamsModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
return _result;
}
@Override
public String toString() {
return "AutoLayoutModelViewManualLayoutParamsModel_{" +
"value_Int=" + value_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,713 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/LayoutOverloadsViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class LayoutOverloadsViewModel_ extends EpoxyModel<LayoutOverloadsView> implements GeneratedModel<LayoutOverloadsView>, LayoutOverloadsViewModelBuilder {
private OnModelBoundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final LayoutOverloadsView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final LayoutOverloadsView object) {
super.bind(object);
}
@Override
public void bind(final LayoutOverloadsView object, EpoxyModel previousModel) {
if (!(previousModel instanceof LayoutOverloadsViewModel_)) {
bind(object);
return;
}
LayoutOverloadsViewModel_ that = (LayoutOverloadsViewModel_) previousModel;
super.bind(object);
}
@Override
public void handlePostBind(final LayoutOverloadsView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public LayoutOverloadsViewModel_ onBind(
OnModelBoundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(LayoutOverloadsView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public LayoutOverloadsViewModel_ onUnbind(
OnModelUnboundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final LayoutOverloadsView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public LayoutOverloadsViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final LayoutOverloadsView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public LayoutOverloadsViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public LayoutOverloadsViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public LayoutOverloadsViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public LayoutOverloadsViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public LayoutOverloadsViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ show() {
super.show();
return this;
}
@Override
public LayoutOverloadsViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public LayoutOverloadsViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.layout_overloads_view;
}
public LayoutOverloadsViewModel_ withOneLayout() {
layout(R.layout.layout_overloads_view_one);
return this;
}
public LayoutOverloadsViewModel_ withTwoLayout() {
layout(R.layout.layout_overloads_view_two);
return this;
}
@Override
public LayoutOverloadsViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof LayoutOverloadsViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
LayoutOverloadsViewModel_ that = (LayoutOverloadsViewModel_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "LayoutOverloadsViewModel_{" +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,714 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/AutoLayoutModelViewMatchParentModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class AutoLayoutModelViewMatchParentModel_ extends EpoxyModel<AutoLayoutModelViewMatchParent> implements GeneratedModel<AutoLayoutModelViewMatchParent>, AutoLayoutModelViewMatchParentModelBuilder {
private OnModelBoundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public AutoLayoutModelViewMatchParent buildView(ViewGroup parent) {
AutoLayoutModelViewMatchParent v = new AutoLayoutModelViewMatchParent(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.MATCH_PARENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final AutoLayoutModelViewMatchParent object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final AutoLayoutModelViewMatchParent object) {
super.bind(object);
object.setValue(value_Int);
}
@Override
public void bind(final AutoLayoutModelViewMatchParent object, EpoxyModel previousModel) {
if (!(previousModel instanceof AutoLayoutModelViewMatchParentModel_)) {
bind(object);
return;
}
AutoLayoutModelViewMatchParentModel_ that = (AutoLayoutModelViewMatchParentModel_) previousModel;
super.bind(object);
if ((value_Int != that.value_Int)) {
object.setValue(value_Int);
}
}
@Override
public void handlePostBind(final AutoLayoutModelViewMatchParent object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewMatchParentModel_ onBind(
OnModelBoundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(AutoLayoutModelViewMatchParent object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewMatchParentModel_ onUnbind(
OnModelUnboundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final AutoLayoutModelViewMatchParent object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewMatchParentModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final AutoLayoutModelViewMatchParent object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewMatchParentModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see AutoLayoutModelViewMatchParent#setValue(int)
*/
public AutoLayoutModelViewMatchParentModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public AutoLayoutModelViewMatchParentModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ show() {
super.show();
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AutoLayoutModelViewMatchParentModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public AutoLayoutModelViewMatchParentModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AutoLayoutModelViewMatchParentModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AutoLayoutModelViewMatchParentModel_ that = (AutoLayoutModelViewMatchParentModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
return _result;
}
@Override
public String toString() {
return "AutoLayoutModelViewMatchParentModel_{" +
"value_Int=" + value_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,715 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TextPropDefaultViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class TextPropDefaultViewModel_ extends EpoxyModel<TextPropDefaultView> implements GeneratedModel<TextPropDefaultView>, TextPropDefaultViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(2);
private OnModelBoundListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
private StringAttributeData textWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value);
private StringAttributeData nullableTextWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value);
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for textWithDefault");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TextPropDefaultView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TextPropDefaultView object) {
super.bind(object);
object.textWithDefault(textWithDefault_StringAttributeData.toString(object.getContext()));
object.nullableTextWithDefault(nullableTextWithDefault_StringAttributeData.toString(object.getContext()));
}
@Override
public void bind(final TextPropDefaultView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TextPropDefaultViewModel_)) {
bind(object);
return;
}
TextPropDefaultViewModel_ that = (TextPropDefaultViewModel_) previousModel;
super.bind(object);
if ((textWithDefault_StringAttributeData != null ? !textWithDefault_StringAttributeData.equals(that.textWithDefault_StringAttributeData) : that.textWithDefault_StringAttributeData != null)) {
object.textWithDefault(textWithDefault_StringAttributeData.toString(object.getContext()));
}
if ((nullableTextWithDefault_StringAttributeData != null ? !nullableTextWithDefault_StringAttributeData.equals(that.nullableTextWithDefault_StringAttributeData) : that.nullableTextWithDefault_StringAttributeData != null)) {
object.nullableTextWithDefault(nullableTextWithDefault_StringAttributeData.toString(object.getContext()));
}
}
@Override
public void handlePostBind(final TextPropDefaultView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TextPropDefaultViewModel_ onBind(
OnModelBoundListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TextPropDefaultView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TextPropDefaultViewModel_ onUnbind(
OnModelUnboundListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TextPropDefaultView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TextPropDefaultViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TextPropDefaultView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TextPropDefaultViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public CharSequence getTextWithDefault(Context context) {
return textWithDefault_StringAttributeData.toString(context);
}
/**
* <i>Required.</i>
*
* @see TextPropDefaultView#textWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ textWithDefault(@NonNull CharSequence textWithDefault) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
if (textWithDefault == null) {
throw new IllegalArgumentException("textWithDefault cannot be null");
}
textWithDefault_StringAttributeData.setValue(textWithDefault);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TextPropDefaultView#textWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ textWithDefault(@StringRes int stringRes) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
textWithDefault_StringAttributeData.setValue(stringRes);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TextPropDefaultView#textWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ textWithDefault(@StringRes int stringRes, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
textWithDefault_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TextPropDefaultView#textWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes,
int quantity, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Nullable
public CharSequence getNullableTextWithDefault(Context context) {
return nullableTextWithDefault_StringAttributeData.toString(context);
}
/**
* <i>Optional</i>: Default value is R.string.string_resource_value
*
* @see TextPropDefaultView#nullableTextWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ nullableTextWithDefault(
@Nullable CharSequence nullableTextWithDefault) {
onMutation();
nullableTextWithDefault_StringAttributeData.setValue(nullableTextWithDefault);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is R.string.string_resource_value
*
* @see TextPropDefaultView#nullableTextWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ nullableTextWithDefault(@StringRes int stringRes) {
onMutation();
nullableTextWithDefault_StringAttributeData.setValue(stringRes);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is R.string.string_resource_value
*
* @see TextPropDefaultView#nullableTextWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ nullableTextWithDefault(@StringRes int stringRes,
Object... formatArgs) {
onMutation();
nullableTextWithDefault_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is R.string.string_resource_value
*
* @see TextPropDefaultView#nullableTextWithDefault(CharSequence)
*/
public TextPropDefaultViewModel_ nullableTextWithDefaultQuantityRes(@PluralsRes int pluralRes,
int quantity, Object... formatArgs) {
onMutation();
nullableTextWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TextPropDefaultViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TextPropDefaultViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TextPropDefaultViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TextPropDefaultViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ show() {
super.show();
return this;
}
@Override
public TextPropDefaultViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TextPropDefaultViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TextPropDefaultViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.textWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value);
this.nullableTextWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TextPropDefaultViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TextPropDefaultViewModel_ that = (TextPropDefaultViewModel_) 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 ((textWithDefault_StringAttributeData != null ? !textWithDefault_StringAttributeData.equals(that.textWithDefault_StringAttributeData) : that.textWithDefault_StringAttributeData != null)) {
return false;
}
if ((nullableTextWithDefault_StringAttributeData != null ? !nullableTextWithDefault_StringAttributeData.equals(that.nullableTextWithDefault_StringAttributeData) : that.nullableTextWithDefault_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (textWithDefault_StringAttributeData != null ? textWithDefault_StringAttributeData.hashCode() : 0);
_result = 31 * _result + (nullableTextWithDefault_StringAttributeData != null ? nullableTextWithDefault_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TextPropDefaultViewModel_{" +
"textWithDefault_StringAttributeData=" + textWithDefault_StringAttributeData +
", nullableTextWithDefault_StringAttributeData=" + nullableTextWithDefault_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,716 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethodParentLayout$WithLayout_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GenerateDefaultLayoutMethodParentLayout$WithLayout_ extends GenerateDefaultLayoutMethodParentLayout.WithLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodParentLayout_WithLayoutBuilder {
private OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public GenerateDefaultLayoutMethodParentLayout$WithLayout_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onBind(
OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onUnbind(
OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onVisibilityChanged(
OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence p0,
long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ show() {
super.show();
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GenerateDefaultLayoutMethodParentLayout$WithLayout_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenerateDefaultLayoutMethodParentLayout$WithLayout_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GenerateDefaultLayoutMethodParentLayout$WithLayout_ that = (GenerateDefaultLayoutMethodParentLayout$WithLayout_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "GenerateDefaultLayoutMethodParentLayout$WithLayout_{" +
"}" + super.toString();
}
}
| 8,717 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/RLayoutInViewModelAnnotationWorksViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class RLayoutInViewModelAnnotationWorksViewModel_ extends EpoxyModel<RLayoutInViewModelAnnotationWorksView> implements GeneratedModel<RLayoutInViewModelAnnotationWorksView>, RLayoutInViewModelAnnotationWorksViewModelBuilder {
private OnModelBoundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final RLayoutInViewModelAnnotationWorksView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final RLayoutInViewModelAnnotationWorksView object) {
super.bind(object);
}
@Override
public void bind(final RLayoutInViewModelAnnotationWorksView object, EpoxyModel previousModel) {
if (!(previousModel instanceof RLayoutInViewModelAnnotationWorksViewModel_)) {
bind(object);
return;
}
RLayoutInViewModelAnnotationWorksViewModel_ that = (RLayoutInViewModelAnnotationWorksViewModel_) previousModel;
super.bind(object);
}
@Override
public void handlePostBind(final RLayoutInViewModelAnnotationWorksView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public RLayoutInViewModelAnnotationWorksViewModel_ onBind(
OnModelBoundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(RLayoutInViewModelAnnotationWorksView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public RLayoutInViewModelAnnotationWorksViewModel_ onUnbind(
OnModelUnboundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final RLayoutInViewModelAnnotationWorksView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public RLayoutInViewModelAnnotationWorksViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final RLayoutInViewModelAnnotationWorksView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public RLayoutInViewModelAnnotationWorksViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ show() {
super.show();
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.res;
}
@Override
public RLayoutInViewModelAnnotationWorksViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof RLayoutInViewModelAnnotationWorksViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
RLayoutInViewModelAnnotationWorksViewModel_ that = (RLayoutInViewModelAnnotationWorksViewModel_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "RLayoutInViewModelAnnotationWorksViewModel_{" +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,718 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ extends GenerateDefaultLayoutMethodNextParentLayout.StillNoLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodNextParentLayout_StillNoLayoutBuilder {
private OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onBind(
OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onUnbind(
OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onVisibilityChanged(
OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence p0,
long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ show() {
super.show();
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ that = (GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_{" +
"}" + super.toString();
}
}
| 8,719 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelReturningClassTypeWithVarargs_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelReturningClassTypeWithVarargs_ extends ModelReturningClassTypeWithVarargs implements GeneratedModel<Object>, ModelReturningClassTypeWithVarargsBuilder {
private OnModelBoundListener<ModelReturningClassTypeWithVarargs_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelReturningClassTypeWithVarargs_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelReturningClassTypeWithVarargs_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelReturningClassTypeWithVarargs_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelReturningClassTypeWithVarargs_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelReturningClassTypeWithVarargs_ onBind(
OnModelBoundListener<ModelReturningClassTypeWithVarargs_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelReturningClassTypeWithVarargs_ onUnbind(
OnModelUnboundListener<ModelReturningClassTypeWithVarargs_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelReturningClassTypeWithVarargs_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelReturningClassTypeWithVarargs_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelReturningClassTypeWithVarargs_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelReturningClassTypeWithVarargs_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelReturningClassTypeWithVarargs_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public ModelReturningClassTypeWithVarargs_ classType(String... varargs) {
super.classType(varargs);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ classType(String first, String... varargs) {
super.classType(first, varargs);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ show() {
super.show();
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ hide() {
super.hide();
return this;
}
@Override
public ModelReturningClassTypeWithVarargs_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelReturningClassTypeWithVarargs_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelReturningClassTypeWithVarargs_ that = (ModelReturningClassTypeWithVarargs_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "ModelReturningClassTypeWithVarargs_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,720 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelViewExtendingSuperClassModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class ModelViewExtendingSuperClassModel_ extends EpoxyModel<ModelViewExtendingSuperClass> implements GeneratedModel<ModelViewExtendingSuperClass>, ModelViewExtendingSuperClassModelBuilder {
private OnModelBoundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int subClassValue_Int = 0;
private int superClassValue_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public ModelViewExtendingSuperClass buildView(ViewGroup parent) {
ModelViewExtendingSuperClass v = new ModelViewExtendingSuperClass(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.MATCH_PARENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final ModelViewExtendingSuperClass object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final ModelViewExtendingSuperClass object) {
super.bind(object);
object.subClassValue(subClassValue_Int);
object.superClassValue(superClassValue_Int);
}
@Override
public void bind(final ModelViewExtendingSuperClass object, EpoxyModel previousModel) {
if (!(previousModel instanceof ModelViewExtendingSuperClassModel_)) {
bind(object);
return;
}
ModelViewExtendingSuperClassModel_ that = (ModelViewExtendingSuperClassModel_) previousModel;
super.bind(object);
if ((subClassValue_Int != that.subClassValue_Int)) {
object.subClassValue(subClassValue_Int);
}
if ((superClassValue_Int != that.superClassValue_Int)) {
object.superClassValue(superClassValue_Int);
}
}
@Override
public void handlePostBind(final ModelViewExtendingSuperClass object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.afterProps();
object.onSubclassAfterPropsSet();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewExtendingSuperClassModel_ onBind(
OnModelBoundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(ModelViewExtendingSuperClass object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.onClear();
object.onSubClassCleared();
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewExtendingSuperClassModel_ onUnbind(
OnModelUnboundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final ModelViewExtendingSuperClass object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewExtendingSuperClassModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final ModelViewExtendingSuperClass object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewExtendingSuperClassModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewExtendingSuperClass#subClassValue(int)
*/
public ModelViewExtendingSuperClassModel_ subClassValue(int subClassValue) {
onMutation();
this.subClassValue_Int = subClassValue;
return this;
}
public int subClassValue() {
return subClassValue_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewExtendingSuperClass#superClassValue(int)
*/
public ModelViewExtendingSuperClassModel_ superClassValue(int superClassValue) {
onMutation();
this.superClassValue_Int = superClassValue;
return this;
}
public int superClassValue() {
return superClassValue_Int;
}
@Override
public ModelViewExtendingSuperClassModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public ModelViewExtendingSuperClassModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ show() {
super.show();
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelViewExtendingSuperClassModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public ModelViewExtendingSuperClassModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.subClassValue_Int = 0;
this.superClassValue_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelViewExtendingSuperClassModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelViewExtendingSuperClassModel_ that = (ModelViewExtendingSuperClassModel_) 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 ((subClassValue_Int != that.subClassValue_Int)) {
return false;
}
if ((superClassValue_Int != that.superClassValue_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + subClassValue_Int;
_result = 31 * _result + superClassValue_Int;
return _result;
}
@Override
public String toString() {
return "ModelViewExtendingSuperClassModel_{" +
"subClassValue_Int=" + subClassValue_Int +
", superClassValue_Int=" + superClassValue_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,721 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropIgnoreRequireHashCodeOptionViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropIgnoreRequireHashCodeOptionViewModel_ extends EpoxyModel<TestFieldPropIgnoreRequireHashCodeOptionView> implements GeneratedModel<TestFieldPropIgnoreRequireHashCodeOptionView>, TestFieldPropIgnoreRequireHashCodeOptionViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private View.OnClickListener value_OnClickListener;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for value");
}
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionView buildView(ViewGroup parent) {
TestFieldPropIgnoreRequireHashCodeOptionView v = new TestFieldPropIgnoreRequireHashCodeOptionView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final TestFieldPropIgnoreRequireHashCodeOptionView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropIgnoreRequireHashCodeOptionView object) {
super.bind(object);
object.value = value_OnClickListener;
}
@Override
public void bind(final TestFieldPropIgnoreRequireHashCodeOptionView object,
EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropIgnoreRequireHashCodeOptionViewModel_)) {
bind(object);
return;
}
TestFieldPropIgnoreRequireHashCodeOptionViewModel_ that = (TestFieldPropIgnoreRequireHashCodeOptionViewModel_) previousModel;
super.bind(object);
if ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) {
object.value = value_OnClickListener;
}
}
@Override
public void handlePostBind(final TestFieldPropIgnoreRequireHashCodeOptionView object,
int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onBind(
OnModelBoundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropIgnoreRequireHashCodeOptionView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropIgnoreRequireHashCodeOptionView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth,
final TestFieldPropIgnoreRequireHashCodeOptionView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ value(
@NonNull final OnModelClickListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> value) {
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
if (value == null) {
this.value_OnClickListener = null;
}
else {
this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value);
}
return this;
}
/**
* <i>Required.</i>
*
* @see TestFieldPropIgnoreRequireHashCodeOptionView#value
*/
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ value(
@NonNull View.OnClickListener value) {
if (value == null) {
throw new IllegalArgumentException("value cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.value_OnClickListener = value;
return this;
}
@NonNull
public View.OnClickListener value() {
return value_OnClickListener;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.value_OnClickListener = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropIgnoreRequireHashCodeOptionViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropIgnoreRequireHashCodeOptionViewModel_ that = (TestFieldPropIgnoreRequireHashCodeOptionViewModel_) 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 ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (value_OnClickListener != null ? value_OnClickListener.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestFieldPropIgnoreRequireHashCodeOptionViewModel_{" +
"value_OnClickListener=" + value_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,722 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethodNextParentLayout$WithLayout_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ extends GenerateDefaultLayoutMethodNextParentLayout.WithLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodNextParentLayout_WithLayoutBuilder {
private OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onBind(
OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onUnbind(
OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onVisibilityChanged(
OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence p0,
long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ show() {
super.show();
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenerateDefaultLayoutMethodNextParentLayout$WithLayout_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ that = (GenerateDefaultLayoutMethodNextParentLayout$WithLayout_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "GenerateDefaultLayoutMethodNextParentLayout$WithLayout_{" +
"}" + super.toString();
}
}
| 8,723 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/IgnoreRequireHashCodeViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class IgnoreRequireHashCodeViewModel_ extends EpoxyModel<IgnoreRequireHashCodeView> implements GeneratedModel<IgnoreRequireHashCodeView>, IgnoreRequireHashCodeViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private View.OnClickListener clickListener_OnClickListener;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final IgnoreRequireHashCodeView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final IgnoreRequireHashCodeView object) {
super.bind(object);
object.setClickListener(clickListener_OnClickListener);
}
@Override
public void bind(final IgnoreRequireHashCodeView object, EpoxyModel previousModel) {
if (!(previousModel instanceof IgnoreRequireHashCodeViewModel_)) {
bind(object);
return;
}
IgnoreRequireHashCodeViewModel_ that = (IgnoreRequireHashCodeViewModel_) previousModel;
super.bind(object);
if ((clickListener_OnClickListener != null ? !clickListener_OnClickListener.equals(that.clickListener_OnClickListener) : that.clickListener_OnClickListener != null)) {
object.setClickListener(clickListener_OnClickListener);
}
}
@Override
public void handlePostBind(final IgnoreRequireHashCodeView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public IgnoreRequireHashCodeViewModel_ onBind(
OnModelBoundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(IgnoreRequireHashCodeView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public IgnoreRequireHashCodeViewModel_ onUnbind(
OnModelUnboundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final IgnoreRequireHashCodeView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public IgnoreRequireHashCodeViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final IgnoreRequireHashCodeView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public IgnoreRequireHashCodeViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public IgnoreRequireHashCodeViewModel_ clickListener(
@NonNull final OnModelClickListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> clickListener) {
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
if (clickListener == null) {
this.clickListener_OnClickListener = null;
}
else {
this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener);
}
return this;
}
/**
* <i>Required.</i>
*
* @see IgnoreRequireHashCodeView#setClickListener(View.OnClickListener)
*/
public IgnoreRequireHashCodeViewModel_ clickListener(
@NonNull View.OnClickListener clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_OnClickListener = clickListener;
return this;
}
@NonNull
public View.OnClickListener clickListener() {
return clickListener_OnClickListener;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ show() {
super.show();
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public IgnoreRequireHashCodeViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public IgnoreRequireHashCodeViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_OnClickListener = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof IgnoreRequireHashCodeViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
IgnoreRequireHashCodeViewModel_ that = (IgnoreRequireHashCodeViewModel_) 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 ((clickListener_OnClickListener != null ? !clickListener_OnClickListener.equals(that.clickListener_OnClickListener) : that.clickListener_OnClickListener != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_OnClickListener != null ? clickListener_OnClickListener.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "IgnoreRequireHashCodeViewModel_{" +
"clickListener_OnClickListener=" + clickListener_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,724 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestStringOverloadsViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
import java.util.List;
/**
* Generated file. Do not modify!
*/
public class TestStringOverloadsViewModel_ extends EpoxyModel<TestStringOverloadsView> implements GeneratedModel<TestStringOverloadsView>, TestStringOverloadsViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(3);
private OnModelBoundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
private StringAttributeData title_StringAttributeData = new StringAttributeData();
/**
* Bitset index: 1
*/
@Nullable
private List<CharSequence> title_List = (List<CharSequence>) null;
/**
* Bitset index: 2
*/
private StringAttributeData titleViaValueShortcut_StringAttributeData = new StringAttributeData();
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(2)) {
throw new IllegalStateException("A value is required for setTitleViaValueShortcut");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestStringOverloadsView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestStringOverloadsView object) {
super.bind(object);
object.setTitleViaValueShortcut(titleViaValueShortcut_StringAttributeData.toString(object.getContext()));
if (assignedAttributes_epoxyGeneratedModel.get(0)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
else if (assignedAttributes_epoxyGeneratedModel.get(1)) {
object.setTitle(title_List);
}
else {
object.setTitle(title_List);
}
}
@Override
public void bind(final TestStringOverloadsView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestStringOverloadsViewModel_)) {
bind(object);
return;
}
TestStringOverloadsViewModel_ that = (TestStringOverloadsViewModel_) previousModel;
super.bind(object);
if ((titleViaValueShortcut_StringAttributeData != null ? !titleViaValueShortcut_StringAttributeData.equals(that.titleViaValueShortcut_StringAttributeData) : that.titleViaValueShortcut_StringAttributeData != null)) {
object.setTitleViaValueShortcut(titleViaValueShortcut_StringAttributeData.toString(object.getContext()));
}
if (assignedAttributes_epoxyGeneratedModel.get(0)) {
if (!that.assignedAttributes_epoxyGeneratedModel.get(0) || (title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
}
else if (assignedAttributes_epoxyGeneratedModel.get(1)) {
if (!that.assignedAttributes_epoxyGeneratedModel.get(1) || (title_List != null ? !title_List.equals(that.title_List) : that.title_List != null)) {
object.setTitle(title_List);
}
}
// A value was not set so we should use the default value, but we only need to set it if the previous model had a custom value set.
else if (that.assignedAttributes_epoxyGeneratedModel.get(0) || that.assignedAttributes_epoxyGeneratedModel.get(1)) {
object.setTitle(title_List);
}
}
@Override
public void handlePostBind(final TestStringOverloadsView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestStringOverloadsViewModel_ onBind(
OnModelBoundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestStringOverloadsView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestStringOverloadsViewModel_ onUnbind(
OnModelUnboundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestStringOverloadsView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestStringOverloadsViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestStringOverloadsView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestStringOverloadsViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public CharSequence titleStringAttributeData(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitle(CharSequence)
*/
public TestStringOverloadsViewModel_ title(@NonNull CharSequence title) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
if (title == null) {
throw new IllegalArgumentException("title cannot be null");
}
title_StringAttributeData.setValue(title);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitle(CharSequence)
*/
public TestStringOverloadsViewModel_ title(@StringRes int stringRes) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitle(CharSequence)
*/
public TestStringOverloadsViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitle(CharSequence)
*/
public TestStringOverloadsViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
/**
* <i>Optional</i>: Default value is (List<CharSequence>) null
*
* @see TestStringOverloadsView#setTitle(List<CharSequence>)
*/
public TestStringOverloadsViewModel_ title(@Nullable List<CharSequence> title) {
assignedAttributes_epoxyGeneratedModel.set(1);
assignedAttributes_epoxyGeneratedModel.clear(0);
this.title_StringAttributeData = new StringAttributeData();
onMutation();
this.title_List = title;
return this;
}
@Nullable
public List<CharSequence> titleList() {
return title_List;
}
public CharSequence getTitleViaValueShortcut(Context context) {
return titleViaValueShortcut_StringAttributeData.toString(context);
}
/**
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence)
*/
public TestStringOverloadsViewModel_ titleViaValueShortcut(
@NonNull CharSequence titleViaValueShortcut) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(2);
if (titleViaValueShortcut == null) {
throw new IllegalArgumentException("titleViaValueShortcut cannot be null");
}
titleViaValueShortcut_StringAttributeData.setValue(titleViaValueShortcut);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence)
*/
public TestStringOverloadsViewModel_ titleViaValueShortcut(@StringRes int stringRes) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(2);
titleViaValueShortcut_StringAttributeData.setValue(stringRes);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence)
*/
public TestStringOverloadsViewModel_ titleViaValueShortcut(@StringRes int stringRes,
Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(2);
titleViaValueShortcut_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence)
*/
public TestStringOverloadsViewModel_ titleViaValueShortcutQuantityRes(@PluralsRes int pluralRes,
int quantity, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(2);
titleViaValueShortcut_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestStringOverloadsViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestStringOverloadsViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ show() {
super.show();
return this;
}
@Override
public TestStringOverloadsViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestStringOverloadsViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TestStringOverloadsViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.title_StringAttributeData = new StringAttributeData();
this.title_List = (List<CharSequence>) null;
this.titleViaValueShortcut_StringAttributeData = new StringAttributeData();
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestStringOverloadsViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestStringOverloadsViewModel_ that = (TestStringOverloadsViewModel_) 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 ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
if ((title_List != null ? !title_List.equals(that.title_List) : that.title_List != null)) {
return false;
}
if ((titleViaValueShortcut_StringAttributeData != null ? !titleViaValueShortcut_StringAttributeData.equals(that.titleViaValueShortcut_StringAttributeData) : that.titleViaValueShortcut_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
_result = 31 * _result + (title_List != null ? title_List.hashCode() : 0);
_result = 31 * _result + (titleViaValueShortcut_StringAttributeData != null ? titleViaValueShortcut_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestStringOverloadsViewModel_{" +
"title_StringAttributeData=" + title_StringAttributeData +
", title_List=" + title_List +
", titleViaValueShortcut_StringAttributeData=" + titleViaValueShortcut_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,725 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/DoNotHashViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class DoNotHashViewModel_ extends EpoxyModel<DoNotHashView> implements GeneratedModel<DoNotHashView>, DoNotHashViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(3);
private OnModelBoundListener<DoNotHashViewModel_, DoNotHashView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<DoNotHashViewModel_, DoNotHashView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<DoNotHashViewModel_, DoNotHashView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<DoNotHashViewModel_, DoNotHashView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private CharSequence title_CharSequence;
/**
* Bitset index: 1
*/
@NonNull
private View.OnClickListener clickListener_OnClickListener;
/**
* Bitset index: 2
*/
@NonNull
private CharSequence normalProp_CharSequence;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(1)) {
throw new IllegalStateException("A value is required for setClickListener");
}
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setTitle");
}
if (!assignedAttributes_epoxyGeneratedModel.get(2)) {
throw new IllegalStateException("A value is required for normalProp");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final DoNotHashView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final DoNotHashView object) {
super.bind(object);
object.setClickListener(clickListener_OnClickListener);
object.setTitle(title_CharSequence);
object.normalProp(normalProp_CharSequence);
}
@Override
public void bind(final DoNotHashView object, EpoxyModel previousModel) {
if (!(previousModel instanceof DoNotHashViewModel_)) {
bind(object);
return;
}
DoNotHashViewModel_ that = (DoNotHashViewModel_) previousModel;
super.bind(object);
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
object.setClickListener(clickListener_OnClickListener);
}
if (((title_CharSequence == null) != (that.title_CharSequence == null))) {
object.setTitle(title_CharSequence);
}
if ((normalProp_CharSequence != null ? !normalProp_CharSequence.equals(that.normalProp_CharSequence) : that.normalProp_CharSequence != null)) {
object.normalProp(normalProp_CharSequence);
}
}
@Override
public void handlePostBind(final DoNotHashView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DoNotHashViewModel_ onBind(
OnModelBoundListener<DoNotHashViewModel_, DoNotHashView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(DoNotHashView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DoNotHashViewModel_ onUnbind(
OnModelUnboundListener<DoNotHashViewModel_, DoNotHashView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final DoNotHashView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DoNotHashViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<DoNotHashViewModel_, DoNotHashView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final DoNotHashView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DoNotHashViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<DoNotHashViewModel_, DoNotHashView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see DoNotHashView#setTitle(CharSequence)
*/
public DoNotHashViewModel_ title(@NonNull CharSequence title) {
if (title == null) {
throw new IllegalArgumentException("title cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.title_CharSequence = title;
return this;
}
@NonNull
public CharSequence title() {
return title_CharSequence;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public DoNotHashViewModel_ clickListener(
@NonNull final OnModelClickListener<DoNotHashViewModel_, DoNotHashView> clickListener) {
assignedAttributes_epoxyGeneratedModel.set(1);
onMutation();
if (clickListener == null) {
this.clickListener_OnClickListener = null;
}
else {
this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener);
}
return this;
}
/**
* <i>Required.</i>
*
* @see DoNotHashView#setClickListener(View.OnClickListener)
*/
public DoNotHashViewModel_ clickListener(@NonNull View.OnClickListener clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(1);
onMutation();
this.clickListener_OnClickListener = clickListener;
return this;
}
@NonNull
public View.OnClickListener clickListener() {
return clickListener_OnClickListener;
}
/**
* <i>Required.</i>
*
* @see DoNotHashView#normalProp(CharSequence)
*/
public DoNotHashViewModel_ normalProp(@NonNull CharSequence normalProp) {
if (normalProp == null) {
throw new IllegalArgumentException("normalProp cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(2);
onMutation();
this.normalProp_CharSequence = normalProp;
return this;
}
@NonNull
public CharSequence normalProp() {
return normalProp_CharSequence;
}
@Override
public DoNotHashViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public DoNotHashViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public DoNotHashViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DoNotHashViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public DoNotHashViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public DoNotHashViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DoNotHashViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public DoNotHashViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public DoNotHashViewModel_ show() {
super.show();
return this;
}
@Override
public DoNotHashViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public DoNotHashViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public DoNotHashViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.title_CharSequence = null;
this.clickListener_OnClickListener = null;
this.normalProp_CharSequence = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof DoNotHashViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
DoNotHashViewModel_ that = (DoNotHashViewModel_) 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 (((title_CharSequence == null) != (that.title_CharSequence == null))) {
return false;
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
return false;
}
if ((normalProp_CharSequence != null ? !normalProp_CharSequence.equals(that.normalProp_CharSequence) : that.normalProp_CharSequence != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_CharSequence != null ? 1 : 0);
_result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0);
_result = 31 * _result + (normalProp_CharSequence != null ? normalProp_CharSequence.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "DoNotHashViewModel_{" +
"title_CharSequence=" + title_CharSequence +
", clickListener_OnClickListener=" + clickListener_OnClickListener +
", normalProp_CharSequence=" + normalProp_CharSequence +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,726 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropModelPropViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropModelPropViewModel_ extends EpoxyModel<TestFieldPropModelPropView> implements GeneratedModel<TestFieldPropModelPropView>, TestFieldPropModelPropViewModelBuilder {
private OnModelBoundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropModelPropView buildView(ViewGroup parent) {
TestFieldPropModelPropView v = new TestFieldPropModelPropView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestFieldPropModelPropView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropModelPropView object) {
super.bind(object);
object.value = value_Int;
}
@Override
public void bind(final TestFieldPropModelPropView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropModelPropViewModel_)) {
bind(object);
return;
}
TestFieldPropModelPropViewModel_ that = (TestFieldPropModelPropViewModel_) previousModel;
super.bind(object);
if ((value_Int != that.value_Int)) {
object.value = value_Int;
}
}
@Override
public void handlePostBind(final TestFieldPropModelPropView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropModelPropViewModel_ onBind(
OnModelBoundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropModelPropView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropModelPropViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropModelPropView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropModelPropViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestFieldPropModelPropView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropModelPropViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestFieldPropModelPropView#value
*/
public TestFieldPropModelPropViewModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
@Override
public TestFieldPropModelPropViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropModelPropViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropModelPropViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropModelPropViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropModelPropViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropModelPropViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropModelPropViewModel_ that = (TestFieldPropModelPropViewModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
return _result;
}
@Override
public String toString() {
return "TestFieldPropModelPropViewModel_{" +
"value_Int=" + value_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,727 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelReturningClassType_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.List;
/**
* Generated file. Do not modify!
*/
public class ModelReturningClassType_ extends ModelReturningClassType implements GeneratedModel<Object>, ModelReturningClassTypeBuilder {
private OnModelBoundListener<ModelReturningClassType_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelReturningClassType_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelReturningClassType_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelReturningClassType_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelReturningClassType_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelReturningClassType_ onBind(
OnModelBoundListener<ModelReturningClassType_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelReturningClassType_ onUnbind(
OnModelUnboundListener<ModelReturningClassType_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelReturningClassType_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelReturningClassType_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelReturningClassType_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelReturningClassType_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelReturningClassType_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public ModelReturningClassType_ classType(int classType) {
super.classType(classType);
return this;
}
@Override
public ModelReturningClassType_ classType(int param1, int param2) {
super.classType(param1, param2);
return this;
}
@Override
public ModelReturningClassType_ list(List<String> list) {
super.list(list);
return this;
}
@Override
public ModelReturningClassType_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassType_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassType_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassType_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelReturningClassType_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassType_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelReturningClassType_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelReturningClassType_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelReturningClassType_ show() {
super.show();
return this;
}
@Override
public ModelReturningClassType_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelReturningClassType_ hide() {
super.hide();
return this;
}
@Override
public ModelReturningClassType_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelReturningClassType_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelReturningClassType_ that = (ModelReturningClassType_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "ModelReturningClassType_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,728 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropDoNotHashOptionViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropDoNotHashOptionViewModel_ extends EpoxyModel<TestFieldPropDoNotHashOptionView> implements GeneratedModel<TestFieldPropDoNotHashOptionView>, TestFieldPropDoNotHashOptionViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private View.OnClickListener value_OnClickListener;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for value");
}
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropDoNotHashOptionView buildView(ViewGroup parent) {
TestFieldPropDoNotHashOptionView v = new TestFieldPropDoNotHashOptionView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final TestFieldPropDoNotHashOptionView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropDoNotHashOptionView object) {
super.bind(object);
object.value = value_OnClickListener;
}
@Override
public void bind(final TestFieldPropDoNotHashOptionView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropDoNotHashOptionViewModel_)) {
bind(object);
return;
}
TestFieldPropDoNotHashOptionViewModel_ that = (TestFieldPropDoNotHashOptionViewModel_) previousModel;
super.bind(object);
if (((value_OnClickListener == null) != (that.value_OnClickListener == null))) {
object.value = value_OnClickListener;
}
}
@Override
public void handlePostBind(final TestFieldPropDoNotHashOptionView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropDoNotHashOptionViewModel_ onBind(
OnModelBoundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropDoNotHashOptionView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropDoNotHashOptionViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropDoNotHashOptionView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropDoNotHashOptionViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestFieldPropDoNotHashOptionView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropDoNotHashOptionViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestFieldPropDoNotHashOptionViewModel_ value(
@NonNull final OnModelClickListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> value) {
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
if (value == null) {
this.value_OnClickListener = null;
}
else {
this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value);
}
return this;
}
/**
* <i>Required.</i>
*
* @see TestFieldPropDoNotHashOptionView#value
*/
public TestFieldPropDoNotHashOptionViewModel_ value(@NonNull View.OnClickListener value) {
if (value == null) {
throw new IllegalArgumentException("value cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.value_OnClickListener = value;
return this;
}
@NonNull
public View.OnClickListener value() {
return value_OnClickListener;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropDoNotHashOptionViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.value_OnClickListener = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropDoNotHashOptionViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropDoNotHashOptionViewModel_ that = (TestFieldPropDoNotHashOptionViewModel_) 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 (((value_OnClickListener == null) != (that.value_OnClickListener == null))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (value_OnClickListener != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "TestFieldPropDoNotHashOptionViewModel_{" +
"value_OnClickListener=" + value_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,729 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAbstractClassAndAnnotation_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithAbstractClassAndAnnotation_ extends ModelWithAbstractClassAndAnnotation implements GeneratedModel<Object>, ModelWithAbstractClassAndAnnotationBuilder {
private OnModelBoundListener<ModelWithAbstractClassAndAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithAbstractClassAndAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithAbstractClassAndAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithAbstractClassAndAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithAbstractClassAndAnnotation_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAbstractClassAndAnnotation_ onBind(
OnModelBoundListener<ModelWithAbstractClassAndAnnotation_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAbstractClassAndAnnotation_ onUnbind(
OnModelUnboundListener<ModelWithAbstractClassAndAnnotation_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAbstractClassAndAnnotation_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithAbstractClassAndAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAbstractClassAndAnnotation_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithAbstractClassAndAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ show() {
super.show();
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ hide() {
super.hide();
return this;
}
@Override
public ModelWithAbstractClassAndAnnotation_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithAbstractClassAndAnnotation_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithAbstractClassAndAnnotation_ that = (ModelWithAbstractClassAndAnnotation_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "ModelWithAbstractClassAndAnnotation_{" +
"}" + super.toString();
}
}
| 8,730 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithFieldAnnotation_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithFieldAnnotation_ extends ModelWithFieldAnnotation implements GeneratedModel<Object>, ModelWithFieldAnnotationBuilder {
private OnModelBoundListener<ModelWithFieldAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithFieldAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithFieldAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithFieldAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithFieldAnnotation_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithFieldAnnotation_ onBind(
OnModelBoundListener<ModelWithFieldAnnotation_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithFieldAnnotation_ onUnbind(
OnModelUnboundListener<ModelWithFieldAnnotation_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithFieldAnnotation_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithFieldAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithFieldAnnotation_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithFieldAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelWithFieldAnnotation_ title(@Nullable String title) {
onMutation();
super.title = title;
return this;
}
@Nullable
public String title() {
return title;
}
@Override
public ModelWithFieldAnnotation_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFieldAnnotation_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFieldAnnotation_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFieldAnnotation_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ show() {
super.show();
return this;
}
@Override
public ModelWithFieldAnnotation_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithFieldAnnotation_ hide() {
super.hide();
return this;
}
@Override
public ModelWithFieldAnnotation_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.title = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithFieldAnnotation_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithFieldAnnotation_ that = (ModelWithFieldAnnotation_) 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 ((title != null ? !title.equals(that.title) : that.title != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title != null ? title.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "ModelWithFieldAnnotation_{" +
"title=" + title +
"}" + super.toString();
}
}
| 8,731 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/DataBindingModelWithAllFieldTypes_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.databinding.ViewDataBinding;
import java.lang.Boolean;
import java.lang.Byte;
import java.lang.CharSequence;
import java.lang.Character;
import java.lang.Double;
import java.lang.Float;
import java.lang.IllegalStateException;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.Short;
import java.lang.String;
import java.util.Arrays;
import java.util.List;
/**
* Generated file. Do not modify!
*/
public class DataBindingModelWithAllFieldTypes_ extends DataBindingModelWithAllFieldTypes implements GeneratedModel<DataBindingEpoxyModel.DataBindingHolder>, DataBindingModelWithAllFieldTypesBuilder {
private OnModelBoundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityChangedListener_epoxyGeneratedModel;
public DataBindingModelWithAllFieldTypes_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final DataBindingEpoxyModel.DataBindingHolder object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final DataBindingEpoxyModel.DataBindingHolder object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DataBindingModelWithAllFieldTypes_ onBind(
OnModelBoundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(DataBindingEpoxyModel.DataBindingHolder object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DataBindingModelWithAllFieldTypes_ onUnbind(
OnModelUnboundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final DataBindingEpoxyModel.DataBindingHolder object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DataBindingModelWithAllFieldTypes_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final DataBindingEpoxyModel.DataBindingHolder object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DataBindingModelWithAllFieldTypes_ onVisibilityChanged(
OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public DataBindingModelWithAllFieldTypes_ valueInt(int valueInt) {
onMutation();
super.valueInt = valueInt;
return this;
}
public int valueInt() {
return valueInt;
}
public DataBindingModelWithAllFieldTypes_ valueInteger(Integer valueInteger) {
onMutation();
super.valueInteger = valueInteger;
return this;
}
public Integer valueInteger() {
return valueInteger;
}
public DataBindingModelWithAllFieldTypes_ valueShort(short valueShort) {
onMutation();
super.valueShort = valueShort;
return this;
}
public short valueShort() {
return valueShort;
}
public DataBindingModelWithAllFieldTypes_ valueShortWrapper(Short valueShortWrapper) {
onMutation();
super.valueShortWrapper = valueShortWrapper;
return this;
}
public Short valueShortWrapper() {
return valueShortWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueChar(char valueChar) {
onMutation();
super.valueChar = valueChar;
return this;
}
public char valueChar() {
return valueChar;
}
public DataBindingModelWithAllFieldTypes_ valueCharacter(Character valueCharacter) {
onMutation();
super.valueCharacter = valueCharacter;
return this;
}
public Character valueCharacter() {
return valueCharacter;
}
public DataBindingModelWithAllFieldTypes_ valuebByte(byte valuebByte) {
onMutation();
super.valuebByte = valuebByte;
return this;
}
public byte valuebByte() {
return valuebByte;
}
public DataBindingModelWithAllFieldTypes_ valueByteWrapper(Byte valueByteWrapper) {
onMutation();
super.valueByteWrapper = valueByteWrapper;
return this;
}
public Byte valueByteWrapper() {
return valueByteWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueLong(long valueLong) {
onMutation();
super.valueLong = valueLong;
return this;
}
public long valueLong() {
return valueLong;
}
public DataBindingModelWithAllFieldTypes_ valueLongWrapper(Long valueLongWrapper) {
onMutation();
super.valueLongWrapper = valueLongWrapper;
return this;
}
public Long valueLongWrapper() {
return valueLongWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueDouble(double valueDouble) {
onMutation();
super.valueDouble = valueDouble;
return this;
}
public double valueDouble() {
return valueDouble;
}
public DataBindingModelWithAllFieldTypes_ valueDoubleWrapper(Double valueDoubleWrapper) {
onMutation();
super.valueDoubleWrapper = valueDoubleWrapper;
return this;
}
public Double valueDoubleWrapper() {
return valueDoubleWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueFloat(float valueFloat) {
onMutation();
super.valueFloat = valueFloat;
return this;
}
public float valueFloat() {
return valueFloat;
}
public DataBindingModelWithAllFieldTypes_ valueFloatWrapper(Float valueFloatWrapper) {
onMutation();
super.valueFloatWrapper = valueFloatWrapper;
return this;
}
public Float valueFloatWrapper() {
return valueFloatWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueBoolean(boolean valueBoolean) {
onMutation();
super.valueBoolean = valueBoolean;
return this;
}
public boolean valueBoolean() {
return valueBoolean;
}
public DataBindingModelWithAllFieldTypes_ valueBooleanWrapper(Boolean valueBooleanWrapper) {
onMutation();
super.valueBooleanWrapper = valueBooleanWrapper;
return this;
}
public Boolean valueBooleanWrapper() {
return valueBooleanWrapper;
}
public DataBindingModelWithAllFieldTypes_ valueIntArray(int[] valueIntArray) {
onMutation();
super.valueIntArray = valueIntArray;
return this;
}
public int[] valueIntArray() {
return valueIntArray;
}
public DataBindingModelWithAllFieldTypes_ valueObjectArray(Object[] valueObjectArray) {
onMutation();
super.valueObjectArray = valueObjectArray;
return this;
}
public Object[] valueObjectArray() {
return valueObjectArray;
}
public DataBindingModelWithAllFieldTypes_ valueString(String valueString) {
onMutation();
super.valueString = valueString;
return this;
}
public String valueString() {
return valueString;
}
public DataBindingModelWithAllFieldTypes_ valueObject(Object valueObject) {
onMutation();
super.valueObject = valueObject;
return this;
}
public Object valueObject() {
return valueObject;
}
public DataBindingModelWithAllFieldTypes_ valueList(List<String> valueList) {
onMutation();
super.valueList = valueList;
return this;
}
public List<String> valueList() {
return valueList;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(long p0) {
super.id(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ show() {
super.show();
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public DataBindingModelWithAllFieldTypes_ hide() {
super.hide();
return this;
}
@Override
protected void setDataBindingVariables(ViewDataBinding binding) {
if (!binding.setVariable(BR.valueInt, valueInt)) {
throw new IllegalStateException("The attribute valueInt was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueInteger, valueInteger)) {
throw new IllegalStateException("The attribute valueInteger was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueShort, valueShort)) {
throw new IllegalStateException("The attribute valueShort was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueShortWrapper, valueShortWrapper)) {
throw new IllegalStateException("The attribute valueShortWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueChar, valueChar)) {
throw new IllegalStateException("The attribute valueChar was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueCharacter, valueCharacter)) {
throw new IllegalStateException("The attribute valueCharacter was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valuebByte, valuebByte)) {
throw new IllegalStateException("The attribute valuebByte was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueByteWrapper, valueByteWrapper)) {
throw new IllegalStateException("The attribute valueByteWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueLong, valueLong)) {
throw new IllegalStateException("The attribute valueLong was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueLongWrapper, valueLongWrapper)) {
throw new IllegalStateException("The attribute valueLongWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueDouble, valueDouble)) {
throw new IllegalStateException("The attribute valueDouble was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper)) {
throw new IllegalStateException("The attribute valueDoubleWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueFloat, valueFloat)) {
throw new IllegalStateException("The attribute valueFloat was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper)) {
throw new IllegalStateException("The attribute valueFloatWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueBoolean, valueBoolean)) {
throw new IllegalStateException("The attribute valueBoolean was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper)) {
throw new IllegalStateException("The attribute valueBooleanWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueIntArray, valueIntArray)) {
throw new IllegalStateException("The attribute valueIntArray was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueObjectArray, valueObjectArray)) {
throw new IllegalStateException("The attribute valueObjectArray was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueString, valueString)) {
throw new IllegalStateException("The attribute valueString was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueObject, valueObject)) {
throw new IllegalStateException("The attribute valueObject was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
if (!binding.setVariable(BR.valueList, valueList)) {
throw new IllegalStateException("The attribute valueList was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout.");
}
}
@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);
}
}
@Override
public DataBindingModelWithAllFieldTypes_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.valueInt = 0;
super.valueInteger = null;
super.valueShort = (short) 0;
super.valueShortWrapper = null;
super.valueChar = (char) 0;
super.valueCharacter = null;
super.valuebByte = (byte) 0;
super.valueByteWrapper = null;
super.valueLong = 0L;
super.valueLongWrapper = null;
super.valueDouble = 0.0d;
super.valueDoubleWrapper = null;
super.valueFloat = 0.0f;
super.valueFloatWrapper = null;
super.valueBoolean = false;
super.valueBooleanWrapper = null;
super.valueIntArray = null;
super.valueObjectArray = null;
super.valueString = null;
super.valueObject = null;
super.valueList = null;
super.reset();
return this;
}
@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;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
long temp;
_result = 31 * _result + valueInt;
_result = 31 * _result + (valueInteger != null ? valueInteger.hashCode() : 0);
_result = 31 * _result + valueShort;
_result = 31 * _result + (valueShortWrapper != null ? valueShortWrapper.hashCode() : 0);
_result = 31 * _result + valueChar;
_result = 31 * _result + (valueCharacter != null ? valueCharacter.hashCode() : 0);
_result = 31 * _result + valuebByte;
_result = 31 * _result + (valueByteWrapper != null ? valueByteWrapper.hashCode() : 0);
_result = 31 * _result + (int) (valueLong ^ (valueLong >>> 32));
_result = 31 * _result + (valueLongWrapper != null ? valueLongWrapper.hashCode() : 0);
temp = Double.doubleToLongBits(valueDouble);
_result = 31 * _result + (int) (temp ^ (temp >>> 32));
_result = 31 * _result + (valueDoubleWrapper != null ? valueDoubleWrapper.hashCode() : 0);
_result = 31 * _result + (valueFloat != +0.0f ? Float.floatToIntBits(valueFloat) : 0);
_result = 31 * _result + (valueFloatWrapper != null ? valueFloatWrapper.hashCode() : 0);
_result = 31 * _result + (valueBoolean ? 1 : 0);
_result = 31 * _result + (valueBooleanWrapper != null ? valueBooleanWrapper.hashCode() : 0);
_result = 31 * _result + Arrays.hashCode(valueIntArray);
_result = 31 * _result + Arrays.hashCode(valueObjectArray);
_result = 31 * _result + (valueString != null ? valueString.hashCode() : 0);
_result = 31 * _result + (valueObject != null ? valueObject.hashCode() : 0);
_result = 31 * _result + (valueList != null ? valueList.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "DataBindingModelWithAllFieldTypes_{" +
"valueInt=" + valueInt +
", valueInteger=" + valueInteger +
", valueShort=" + valueShort +
", valueShortWrapper=" + valueShortWrapper +
", valueChar=" + valueChar +
", valueCharacter=" + valueCharacter +
", valuebByte=" + valuebByte +
", valueByteWrapper=" + valueByteWrapper +
", valueLong=" + valueLong +
", valueLongWrapper=" + valueLongWrapper +
", valueDouble=" + valueDouble +
", valueDoubleWrapper=" + valueDoubleWrapper +
", valueFloat=" + valueFloat +
", valueFloatWrapper=" + valueFloatWrapper +
", valueBoolean=" + valueBoolean +
", valueBooleanWrapper=" + valueBooleanWrapper +
", valueIntArray=" + valueIntArray +
", valueObjectArray=" + valueObjectArray +
", valueString=" + valueString +
", valueObject=" + valueObject +
", valueList=" + valueList +
"}" + super.toString();
}
}
| 8,732 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/AutoLayoutModelViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class AutoLayoutModelViewModel_ extends EpoxyModel<AutoLayoutModelView> implements GeneratedModel<AutoLayoutModelView>, AutoLayoutModelViewModelBuilder {
private OnModelBoundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public AutoLayoutModelView buildView(ViewGroup parent) {
AutoLayoutModelView v = new AutoLayoutModelView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final AutoLayoutModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final AutoLayoutModelView object) {
super.bind(object);
object.setValue(value_Int);
}
@Override
public void bind(final AutoLayoutModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof AutoLayoutModelViewModel_)) {
bind(object);
return;
}
AutoLayoutModelViewModel_ that = (AutoLayoutModelViewModel_) previousModel;
super.bind(object);
if ((value_Int != that.value_Int)) {
object.setValue(value_Int);
}
}
@Override
public void handlePostBind(final AutoLayoutModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewModel_ onBind(
OnModelBoundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(AutoLayoutModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AutoLayoutModelViewModel_ onUnbind(
OnModelUnboundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final AutoLayoutModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final AutoLayoutModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AutoLayoutModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see AutoLayoutModelView#setValue(int)
*/
public AutoLayoutModelViewModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
@Override
public AutoLayoutModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AutoLayoutModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AutoLayoutModelViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public AutoLayoutModelViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AutoLayoutModelViewModel_ show() {
super.show();
return this;
}
@Override
public AutoLayoutModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AutoLayoutModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public AutoLayoutModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AutoLayoutModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AutoLayoutModelViewModel_ that = (AutoLayoutModelViewModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
return _result;
}
@Override
public String toString() {
return "AutoLayoutModelViewModel_{" +
"value_Int=" + value_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,733 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestManyTypesViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import android.view.View;
import androidx.annotation.Dimension;
import androidx.annotation.IntRange;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Integer;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
import java.util.Map;
import kotlin.jvm.functions.Function3;
/**
* Generated file. Do not modify!
*/
public class TestManyTypesViewModel_ extends EpoxyModel<TestManyTypesView> implements GeneratedModel<TestManyTypesView>, TestManyTypesViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(17);
private OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String stringValue_String;
@Nullable
private String nullableStringValue_String = (String) null;
/**
* Bitset index: 2
*/
@NonNull
private Function3<? super Integer, ? super Integer, ? super Integer, Integer> function_Function3;
private int intValue_Int = 0;
@StringRes
private int intValueWithAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
private int intValueWithRangeAnnotation_Int = 0;
@Dimension(
unit = 0
)
private int intValueWithDimenTypeAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
private int intWithMultipleAnnotations_Int = 0;
/**
* Bitset index: 8
*/
@NonNull
private Integer integerValue_Integer;
private boolean boolValue_Boolean = false;
/**
* Bitset index: 10
*/
@NonNull
private List<? extends EpoxyModel<?>> models_List;
/**
* Bitset index: 11
*/
@NonNull
private Boolean booleanValue_Boolean;
/**
* Bitset index: 12
*/
@NonNull
private String[] arrayValue_StringArray;
/**
* Bitset index: 13
*/
@NonNull
private List<String> listValue_List;
/**
* Bitset index: 14
*/
@NonNull
private Map<Integer, Integer> mapValue_Map;
/**
* Bitset index: 15
*/
@NonNull
private View.OnClickListener clickListener_OnClickListener;
private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null);
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(14)) {
throw new IllegalStateException("A value is required for setMapValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(12)) {
throw new IllegalStateException("A value is required for setArrayValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(15)) {
throw new IllegalStateException("A value is required for setClickListener");
}
if (!assignedAttributes_epoxyGeneratedModel.get(11)) {
throw new IllegalStateException("A value is required for setBooleanValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setStringValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(8)) {
throw new IllegalStateException("A value is required for setIntegerValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(13)) {
throw new IllegalStateException("A value is required for setListValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(2)) {
throw new IllegalStateException("A value is required for setFunction");
}
if (!assignedAttributes_epoxyGeneratedModel.get(10)) {
throw new IllegalStateException("A value is required for setModels");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestManyTypesView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestManyTypesView object) {
super.bind(object);
object.setMapValue(mapValue_Map);
object.setArrayValue(arrayValue_StringArray);
object.setClickListener(clickListener_OnClickListener);
object.setBooleanValue(booleanValue_Boolean);
object.setTitle(title_StringAttributeData.toString(object.getContext()));
object.setStringValue(stringValue_String);
object.setNullableStringValue(nullableStringValue_String);
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
object.setIntegerValue(integerValue_Integer);
object.setListValue(listValue_List);
object.setIntValue(intValue_Int);
object.setFunction(function_Function3);
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
object.setBoolValue(boolValue_Boolean);
object.setModels(models_List);
}
@Override
public void bind(final TestManyTypesView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestManyTypesViewModel_)) {
bind(object);
return;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) previousModel;
super.bind(object);
if ((mapValue_Map != null ? !mapValue_Map.equals(that.mapValue_Map) : that.mapValue_Map != null)) {
object.setMapValue(mapValue_Map);
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
object.setArrayValue(arrayValue_StringArray);
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
object.setClickListener(clickListener_OnClickListener);
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
object.setBooleanValue(booleanValue_Boolean);
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
object.setStringValue(stringValue_String);
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
object.setNullableStringValue(nullableStringValue_String);
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
}
if ((integerValue_Integer != null ? !integerValue_Integer.equals(that.integerValue_Integer) : that.integerValue_Integer != null)) {
object.setIntegerValue(integerValue_Integer);
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
object.setListValue(listValue_List);
}
if ((intValue_Int != that.intValue_Int)) {
object.setIntValue(intValue_Int);
}
if (((function_Function3 == null) != (that.function_Function3 == null))) {
object.setFunction(function_Function3);
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
object.setBoolValue(boolValue_Boolean);
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
object.setModels(models_List);
}
}
@Override
public void handlePostBind(final TestManyTypesView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onBind(
OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestManyTypesView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onUnbind(
OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestManyTypesView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestManyTypesView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setStringValue(String)
*/
public TestManyTypesViewModel_ stringValue(@NonNull String stringValue) {
if (stringValue == null) {
throw new IllegalArgumentException("stringValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.stringValue_String = stringValue;
return this;
}
@NonNull
public String stringValue() {
return stringValue_String;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see TestManyTypesView#setNullableStringValue(String)
*/
public TestManyTypesViewModel_ nullableStringValue(@Nullable String nullableStringValue) {
onMutation();
this.nullableStringValue_String = nullableStringValue;
return this;
}
@Nullable
public String nullableStringValue() {
return nullableStringValue_String;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setFunction(Function3<? super Integer, ? super Integer, ? super Integer, Integer>)
*/
public TestManyTypesViewModel_ function(
@NonNull Function3<? super Integer, ? super Integer, ? super Integer, Integer> function) {
if (function == null) {
throw new IllegalArgumentException("function cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(2);
onMutation();
this.function_Function3 = function;
return this;
}
@NonNull
public Function3<? super Integer, ? super Integer, ? super Integer, Integer> function() {
return function_Function3;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValue(int)
*/
public TestManyTypesViewModel_ intValue(int intValue) {
onMutation();
this.intValue_Int = intValue;
return this;
}
public int intValue() {
return intValue_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithAnnotation(@StringRes int intValueWithAnnotation) {
onMutation();
this.intValueWithAnnotation_Int = intValueWithAnnotation;
return this;
}
@StringRes
public int intValueWithAnnotation() {
return intValueWithAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithRangeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithRangeAnnotation(
@IntRange(from = 0, to = 200) int intValueWithRangeAnnotation) {
onMutation();
this.intValueWithRangeAnnotation_Int = intValueWithRangeAnnotation;
return this;
}
@IntRange(
from = 0,
to = 200
)
public int intValueWithRangeAnnotation() {
return intValueWithRangeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithDimenTypeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithDimenTypeAnnotation(
@Dimension(unit = 0) int intValueWithDimenTypeAnnotation) {
onMutation();
this.intValueWithDimenTypeAnnotation_Int = intValueWithDimenTypeAnnotation;
return this;
}
@Dimension(
unit = 0
)
public int intValueWithDimenTypeAnnotation() {
return intValueWithDimenTypeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntWithMultipleAnnotations(int)
*/
public TestManyTypesViewModel_ intWithMultipleAnnotations(
@IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations) {
onMutation();
this.intWithMultipleAnnotations_Int = intWithMultipleAnnotations;
return this;
}
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
public int intWithMultipleAnnotations() {
return intWithMultipleAnnotations_Int;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setIntegerValue(Integer)
*/
public TestManyTypesViewModel_ integerValue(@NonNull Integer integerValue) {
if (integerValue == null) {
throw new IllegalArgumentException("integerValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(8);
onMutation();
this.integerValue_Integer = integerValue;
return this;
}
@NonNull
public Integer integerValue() {
return integerValue_Integer;
}
/**
* <i>Optional</i>: Default value is false
*
* @see TestManyTypesView#setBoolValue(boolean)
*/
public TestManyTypesViewModel_ boolValue(boolean boolValue) {
onMutation();
this.boolValue_Boolean = boolValue;
return this;
}
public boolean boolValue() {
return boolValue_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setModels(List<? extends EpoxyModel<?>>)
*/
public TestManyTypesViewModel_ models(@NonNull List<? extends EpoxyModel<?>> models) {
if (models == null) {
throw new IllegalArgumentException("models cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(10);
onMutation();
this.models_List = models;
return this;
}
@NonNull
public List<? extends EpoxyModel<?>> models() {
return models_List;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setBooleanValue(Boolean)
*/
public TestManyTypesViewModel_ booleanValue(@NonNull Boolean booleanValue) {
if (booleanValue == null) {
throw new IllegalArgumentException("booleanValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(11);
onMutation();
this.booleanValue_Boolean = booleanValue;
return this;
}
@NonNull
public Boolean booleanValue() {
return booleanValue_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setArrayValue(String[])
*/
public TestManyTypesViewModel_ arrayValue(@NonNull String[] arrayValue) {
if (arrayValue == null) {
throw new IllegalArgumentException("arrayValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(12);
onMutation();
this.arrayValue_StringArray = arrayValue;
return this;
}
@NonNull
public String[] arrayValue() {
return arrayValue_StringArray;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setListValue(List<String>)
*/
public TestManyTypesViewModel_ listValue(@NonNull List<String> listValue) {
if (listValue == null) {
throw new IllegalArgumentException("listValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(13);
onMutation();
this.listValue_List = listValue;
return this;
}
@NonNull
public List<String> listValue() {
return listValue_List;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setMapValue(Map<Integer, Integer>)
*/
public TestManyTypesViewModel_ mapValue(@NonNull Map<Integer, Integer> mapValue) {
if (mapValue == null) {
throw new IllegalArgumentException("mapValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(14);
onMutation();
this.mapValue_Map = mapValue;
return this;
}
@NonNull
public Map<Integer, Integer> mapValue() {
return mapValue_Map;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestManyTypesViewModel_ clickListener(
@NonNull final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener) {
assignedAttributes_epoxyGeneratedModel.set(15);
onMutation();
if (clickListener == null) {
this.clickListener_OnClickListener = null;
}
else {
this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener);
}
return this;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setClickListener(View.OnClickListener)
*/
public TestManyTypesViewModel_ clickListener(@NonNull View.OnClickListener clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(15);
onMutation();
this.clickListener_OnClickListener = clickListener;
return this;
}
@NonNull
public View.OnClickListener clickListener() {
return clickListener_OnClickListener;
}
@Nullable
public CharSequence getTitle(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@Nullable CharSequence title) {
onMutation();
title_StringAttributeData.setValue(title);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes) {
onMutation();
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestManyTypesViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public TestManyTypesViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestManyTypesViewModel_ show() {
super.show();
return this;
}
@Override
public TestManyTypesViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestManyTypesViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public TestManyTypesViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.stringValue_String = null;
this.nullableStringValue_String = (String) null;
this.function_Function3 = null;
this.intValue_Int = 0;
this.intValueWithAnnotation_Int = 0;
this.intValueWithRangeAnnotation_Int = 0;
this.intValueWithDimenTypeAnnotation_Int = 0;
this.intWithMultipleAnnotations_Int = 0;
this.integerValue_Integer = null;
this.boolValue_Boolean = false;
this.models_List = null;
this.booleanValue_Boolean = null;
this.arrayValue_StringArray = null;
this.listValue_List = null;
this.mapValue_Map = null;
this.clickListener_OnClickListener = null;
this.title_StringAttributeData = new StringAttributeData((CharSequence) null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestManyTypesViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) 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 ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
return false;
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
return false;
}
if (((function_Function3 == null) != (that.function_Function3 == null))) {
return false;
}
if ((intValue_Int != that.intValue_Int)) {
return false;
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
return false;
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
return false;
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
return false;
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
return false;
}
if ((integerValue_Integer != null ? !integerValue_Integer.equals(that.integerValue_Integer) : that.integerValue_Integer != null)) {
return false;
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
return false;
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
return false;
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
return false;
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
return false;
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
return false;
}
if ((mapValue_Map != null ? !mapValue_Map.equals(that.mapValue_Map) : that.mapValue_Map != null)) {
return false;
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
return false;
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (stringValue_String != null ? stringValue_String.hashCode() : 0);
_result = 31 * _result + (nullableStringValue_String != null ? nullableStringValue_String.hashCode() : 0);
_result = 31 * _result + (function_Function3 != null ? 1 : 0);
_result = 31 * _result + intValue_Int;
_result = 31 * _result + intValueWithAnnotation_Int;
_result = 31 * _result + intValueWithRangeAnnotation_Int;
_result = 31 * _result + intValueWithDimenTypeAnnotation_Int;
_result = 31 * _result + intWithMultipleAnnotations_Int;
_result = 31 * _result + (integerValue_Integer != null ? integerValue_Integer.hashCode() : 0);
_result = 31 * _result + (boolValue_Boolean ? 1 : 0);
_result = 31 * _result + (models_List != null ? models_List.hashCode() : 0);
_result = 31 * _result + (booleanValue_Boolean != null ? booleanValue_Boolean.hashCode() : 0);
_result = 31 * _result + Arrays.hashCode(arrayValue_StringArray);
_result = 31 * _result + (listValue_List != null ? listValue_List.hashCode() : 0);
_result = 31 * _result + (mapValue_Map != null ? mapValue_Map.hashCode() : 0);
_result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestManyTypesViewModel_{" +
"stringValue_String=" + stringValue_String +
", nullableStringValue_String=" + nullableStringValue_String +
", intValue_Int=" + intValue_Int +
", intValueWithAnnotation_Int=" + intValueWithAnnotation_Int +
", intValueWithRangeAnnotation_Int=" + intValueWithRangeAnnotation_Int +
", intValueWithDimenTypeAnnotation_Int=" + intValueWithDimenTypeAnnotation_Int +
", intWithMultipleAnnotations_Int=" + intWithMultipleAnnotations_Int +
", integerValue_Integer=" + integerValue_Integer +
", boolValue_Boolean=" + boolValue_Boolean +
", models_List=" + models_List +
", booleanValue_Boolean=" + booleanValue_Boolean +
", arrayValue_StringArray=" + arrayValue_StringArray +
", listValue_List=" + listValue_List +
", mapValue_Map=" + mapValue_Map +
", clickListener_OnClickListener=" + clickListener_OnClickListener +
", title_StringAttributeData=" + title_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,734 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelViewSuperClassModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class ModelViewSuperClassModel_ extends EpoxyModel<ModelViewSuperClass> implements GeneratedModel<ModelViewSuperClass>, ModelViewSuperClassModelBuilder {
private OnModelBoundListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int superClassValue_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public ModelViewSuperClass buildView(ViewGroup parent) {
ModelViewSuperClass v = new ModelViewSuperClass(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.MATCH_PARENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final ModelViewSuperClass object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final ModelViewSuperClass object) {
super.bind(object);
object.superClassValue(superClassValue_Int);
}
@Override
public void bind(final ModelViewSuperClass object, EpoxyModel previousModel) {
if (!(previousModel instanceof ModelViewSuperClassModel_)) {
bind(object);
return;
}
ModelViewSuperClassModel_ that = (ModelViewSuperClassModel_) previousModel;
super.bind(object);
if ((superClassValue_Int != that.superClassValue_Int)) {
object.superClassValue(superClassValue_Int);
}
}
@Override
public void handlePostBind(final ModelViewSuperClass object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.afterProps();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewSuperClassModel_ onBind(
OnModelBoundListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(ModelViewSuperClass object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.onClear();
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewSuperClassModel_ onUnbind(
OnModelUnboundListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final ModelViewSuperClass object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewSuperClassModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final ModelViewSuperClass object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewSuperClassModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewSuperClass#superClassValue(int)
*/
public ModelViewSuperClassModel_ superClassValue(int superClassValue) {
onMutation();
this.superClassValue_Int = superClassValue;
return this;
}
public int superClassValue() {
return superClassValue_Int;
}
@Override
public ModelViewSuperClassModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelViewSuperClassModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelViewSuperClassModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewSuperClassModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelViewSuperClassModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewSuperClassModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewSuperClassModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public ModelViewSuperClassModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelViewSuperClassModel_ show() {
super.show();
return this;
}
@Override
public ModelViewSuperClassModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelViewSuperClassModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public ModelViewSuperClassModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.superClassValue_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelViewSuperClassModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelViewSuperClassModel_ that = (ModelViewSuperClassModel_) 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 ((superClassValue_Int != that.superClassValue_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + superClassValue_Int;
return _result;
}
@Override
public String toString() {
return "ModelViewSuperClassModel_{" +
"superClassValue_Int=" + superClassValue_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,735 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropTextPropViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropTextPropViewModel_ extends EpoxyModel<TestFieldPropTextPropView> implements GeneratedModel<TestFieldPropTextPropView>, TestFieldPropTextPropViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
private StringAttributeData value_StringAttributeData = new StringAttributeData();
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for value");
}
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropTextPropView buildView(ViewGroup parent) {
TestFieldPropTextPropView v = new TestFieldPropTextPropView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestFieldPropTextPropView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropTextPropView object) {
super.bind(object);
object.value = value_StringAttributeData.toString(object.getContext());
}
@Override
public void bind(final TestFieldPropTextPropView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropTextPropViewModel_)) {
bind(object);
return;
}
TestFieldPropTextPropViewModel_ that = (TestFieldPropTextPropViewModel_) previousModel;
super.bind(object);
if ((value_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_StringAttributeData != null)) {
object.value = value_StringAttributeData.toString(object.getContext());
}
}
@Override
public void handlePostBind(final TestFieldPropTextPropView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropTextPropViewModel_ onBind(
OnModelBoundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropTextPropView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropTextPropViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropTextPropView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropTextPropViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestFieldPropTextPropView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropTextPropViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public CharSequence getValue(Context context) {
return value_StringAttributeData.toString(context);
}
/**
* <i>Required.</i>
*
* @see TestFieldPropTextPropView#value
*/
public TestFieldPropTextPropViewModel_ value(@NonNull CharSequence value) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
if (value == null) {
throw new IllegalArgumentException("value cannot be null");
}
value_StringAttributeData.setValue(value);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestFieldPropTextPropView#value
*/
public TestFieldPropTextPropViewModel_ value(@StringRes int stringRes) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
value_StringAttributeData.setValue(stringRes);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestFieldPropTextPropView#value
*/
public TestFieldPropTextPropViewModel_ value(@StringRes int stringRes, Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
value_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* Throws if a value <= 0 is set.
* <p>
* <i>Required.</i>
*
* @see TestFieldPropTextPropView#value
*/
public TestFieldPropTextPropViewModel_ valueQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
assignedAttributes_epoxyGeneratedModel.set(0);
value_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropTextPropViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropTextPropViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropTextPropViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropTextPropViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.value_StringAttributeData = new StringAttributeData();
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropTextPropViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropTextPropViewModel_ that = (TestFieldPropTextPropViewModel_) 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 ((value_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (value_StringAttributeData != null ? value_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestFieldPropTextPropViewModel_{" +
"value_StringAttributeData=" + value_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,736 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithFinalField_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithFinalField_ extends ModelWithFinalField implements GeneratedModel<Object>, ModelWithFinalFieldBuilder {
private OnModelBoundListener<ModelWithFinalField_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithFinalField_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithFinalField_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithFinalField_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithFinalField_(long id, int valueInt) {
super(id, valueInt);
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithFinalField_ onBind(OnModelBoundListener<ModelWithFinalField_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithFinalField_ onUnbind(
OnModelUnboundListener<ModelWithFinalField_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithFinalField_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithFinalField_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithFinalField_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithFinalField_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public int finalValueInt() {
return finalValueInt;
}
public ModelWithFinalField_ nonFinalValueInt(int nonFinalValueInt) {
onMutation();
super.nonFinalValueInt = nonFinalValueInt;
return this;
}
public int nonFinalValueInt() {
return nonFinalValueInt;
}
@Override
public ModelWithFinalField_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFinalField_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFinalField_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFinalField_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithFinalField_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFinalField_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithFinalField_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithFinalField_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithFinalField_ show() {
super.show();
return this;
}
@Override
public ModelWithFinalField_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithFinalField_ hide() {
super.hide();
return this;
}
@Override
public ModelWithFinalField_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.nonFinalValueInt = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithFinalField_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithFinalField_ that = (ModelWithFinalField_) 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 ((finalValueInt != that.finalValueInt)) {
return false;
}
if ((nonFinalValueInt != that.nonFinalValueInt)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + finalValueInt;
_result = 31 * _result + nonFinalValueInt;
return _result;
}
@Override
public String toString() {
return "ModelWithFinalField_{" +
"finalValueInt=" + finalValueInt +
", nonFinalValueInt=" + nonFinalValueInt +
"}" + super.toString();
}
}
| 8,737 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAnnotatedClass_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithAnnotatedClass_ extends ModelWithAnnotatedClass implements GeneratedModel<Object>, ModelWithAnnotatedClassBuilder {
private OnModelBoundListener<ModelWithAnnotatedClass_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithAnnotatedClass_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithAnnotatedClass_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithAnnotatedClass_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithAnnotatedClass_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAnnotatedClass_ onBind(
OnModelBoundListener<ModelWithAnnotatedClass_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAnnotatedClass_ onUnbind(
OnModelUnboundListener<ModelWithAnnotatedClass_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAnnotatedClass_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithAnnotatedClass_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAnnotatedClass_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithAnnotatedClass_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public ModelWithAnnotatedClass_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotatedClass_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotatedClass_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotatedClass_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ show() {
super.show();
return this;
}
@Override
public ModelWithAnnotatedClass_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithAnnotatedClass_ hide() {
super.hide();
return this;
}
@Override
public ModelWithAnnotatedClass_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithAnnotatedClass_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithAnnotatedClass_ that = (ModelWithAnnotatedClass_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "ModelWithAnnotatedClass_{" +
"}" + super.toString();
}
}
| 8,738 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithSuperAttributes_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithSuperAttributes_ extends ModelWithSuperAttributes implements GeneratedModel<Object>, ModelWithSuperAttributesBuilder {
private OnModelBoundListener<ModelWithSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithSuperAttributes_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuperAttributes_ onBind(
OnModelBoundListener<ModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuperAttributes_ onUnbind(
OnModelUnboundListener<ModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuperAttributes_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuperAttributes_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithSuperAttributes_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelWithSuperAttributes_ superValue(int superValue) {
onMutation();
super.superValue = superValue;
return this;
}
public int superValue() {
return superValue;
}
@Override
public ModelWithSuperAttributes_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuperAttributes_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ show() {
super.show();
return this;
}
@Override
public ModelWithSuperAttributes_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithSuperAttributes_ hide() {
super.hide();
return this;
}
@Override
public ModelWithSuperAttributes_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.superValue = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithSuperAttributes_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithSuperAttributes_ that = (ModelWithSuperAttributes_) 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 ((superValue != that.superValue)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + superValue;
return _result;
}
@Override
public String toString() {
return "ModelWithSuperAttributes_{" +
"superValue=" + superValue +
"}" + super.toString();
}
}
| 8,739 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/AbstractEpoxyModelWithView_.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class AbstractEpoxyModelWithView_ extends AbstractEpoxyModelWithView implements GeneratedModel<View>, AbstractEpoxyModelWithViewBuilder {
private OnModelBoundListener<AbstractEpoxyModelWithView_, View> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AbstractEpoxyModelWithView_, View> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AbstractEpoxyModelWithView_, View> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AbstractEpoxyModelWithView_, View> onModelVisibilityChangedListener_epoxyGeneratedModel;
public AbstractEpoxyModelWithView_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final View object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final View object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractEpoxyModelWithView_ onBind(
OnModelBoundListener<AbstractEpoxyModelWithView_, View> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(View object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractEpoxyModelWithView_ onUnbind(
OnModelUnboundListener<AbstractEpoxyModelWithView_, View> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final View object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractEpoxyModelWithView_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AbstractEpoxyModelWithView_, View> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final View object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractEpoxyModelWithView_ onVisibilityChanged(
OnModelVisibilityChangedListener<AbstractEpoxyModelWithView_, View> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public AbstractEpoxyModelWithView_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractEpoxyModelWithView_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractEpoxyModelWithView_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ show() {
super.show();
return this;
}
@Override
public AbstractEpoxyModelWithView_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AbstractEpoxyModelWithView_ hide() {
super.hide();
return this;
}
@Override
public AbstractEpoxyModelWithView_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AbstractEpoxyModelWithView_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AbstractEpoxyModelWithView_ that = (AbstractEpoxyModelWithView_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "AbstractEpoxyModelWithView_{" +
"}" + super.toString();
}
}
| 8,740 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithSuper_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelWithSuper_ extends ModelWithSuper implements GeneratedModel<Object>, ModelWithSuperBuilder {
private OnModelBoundListener<ModelWithSuper_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithSuper_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithSuper_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithSuper_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithSuper_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuper_ onBind(OnModelBoundListener<ModelWithSuper_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithSuper_ onUnbind(OnModelUnboundListener<ModelWithSuper_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuper_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithSuper_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithSuper_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithSuper_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelWithSuper_ valueInt(int valueInt) {
onMutation();
super.valueInt = valueInt;
super.valueInt(valueInt);
return this;
}
public int valueInt() {
return valueInt;
}
@Override
public ModelWithSuper_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuper_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuper_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuper_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithSuper_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuper_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithSuper_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithSuper_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithSuper_ show() {
super.show();
return this;
}
@Override
public ModelWithSuper_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithSuper_ hide() {
super.hide();
return this;
}
@Override
public ModelWithSuper_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.valueInt = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithSuper_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithSuper_ that = (ModelWithSuper_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + valueInt;
return _result;
}
@Override
public String toString() {
return "ModelWithSuper_{" +
"valueInt=" + valueInt +
"}" + super.toString();
}
}
| 8,741 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ControllerWithAutoModelWithSuperClass_EpoxyHelper.java | package com.airbnb.epoxy.adapter;
import com.airbnb.epoxy.BasicModelWithAttribute_;
import com.airbnb.epoxy.ControllerHelper;
import com.airbnb.epoxy.EpoxyModel;
import java.lang.IllegalStateException;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ControllerWithAutoModelWithSuperClass_EpoxyHelper extends ControllerHelper<ControllerWithAutoModelWithSuperClass> {
private final ControllerWithAutoModelWithSuperClass controller;
private EpoxyModel modelWithAttribute2;
private EpoxyModel modelWithAttribute1;
public ControllerWithAutoModelWithSuperClass_EpoxyHelper(
ControllerWithAutoModelWithSuperClass controller) {
this.controller = controller;
}
@Override
public void resetAutoModels() {
validateModelsHaveNotChanged();
controller.modelWithAttribute2 = new BasicModelWithAttribute_();
controller.modelWithAttribute2.id(-1);
controller.modelWithAttribute1 = new BasicModelWithAttribute_();
controller.modelWithAttribute1.id(-2);
saveModelsForNextValidation();
}
private void validateModelsHaveNotChanged() {
validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -1);
validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -2);
validateModelHashCodesHaveNotChanged(controller);
}
private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject,
String fieldName, int id) {
if (expectedObject != actualObject) {
throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
if (actualObject != null && actualObject.id() != id) {
throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
}
private void saveModelsForNextValidation() {
modelWithAttribute2 = controller.modelWithAttribute2;
modelWithAttribute1 = controller.modelWithAttribute1;
}
}
| 8,742 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_(long id) {
super(id);
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,743 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/PropDefaultsViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class PropDefaultsViewModel_ extends EpoxyModel<PropDefaultsView> implements GeneratedModel<PropDefaultsView>, PropDefaultsViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(6);
private OnModelBoundListener<PropDefaultsViewModel_, PropDefaultsView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<PropDefaultsViewModel_, PropDefaultsView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<PropDefaultsViewModel_, PropDefaultsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<PropDefaultsViewModel_, PropDefaultsView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private CharSequence defaultsToNull_CharSequence = (CharSequence) null;
/**
* Bitset index: 1
*/
@NonNull
private CharSequence noDefaultSoItIsRequired_CharSequence;
private int primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = 0;
private int primitiveWithExplicitDefault_Int = PropDefaultsView.PRIMITIVE_DEFAULT;
@NonNull
private String objectWithDefault_String = PropDefaultsView.STRING_DEFAULT;
@Nullable
private String objectWithDefaultAndNullable_String = PropDefaultsView.STRING_DEFAULT;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(1)) {
throw new IllegalStateException("A value is required for noDefaultSoItIsRequired");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final PropDefaultsView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final PropDefaultsView object) {
super.bind(object);
object.primitiveWithExplicitDefault(primitiveWithExplicitDefault_Int);
object.defaultsToNull(defaultsToNull_CharSequence);
object.noDefaultSoItIsRequired(noDefaultSoItIsRequired_CharSequence);
object.objectWithDefaultAndNullable(objectWithDefaultAndNullable_String);
object.objectWithDefault(objectWithDefault_String);
object.primitivesHaveImplicitDefaultsAndCannotBeRequired(primitivesHaveImplicitDefaultsAndCannotBeRequired_Int);
}
@Override
public void bind(final PropDefaultsView object, EpoxyModel previousModel) {
if (!(previousModel instanceof PropDefaultsViewModel_)) {
bind(object);
return;
}
PropDefaultsViewModel_ that = (PropDefaultsViewModel_) previousModel;
super.bind(object);
if ((primitiveWithExplicitDefault_Int != that.primitiveWithExplicitDefault_Int)) {
object.primitiveWithExplicitDefault(primitiveWithExplicitDefault_Int);
}
if ((defaultsToNull_CharSequence != null ? !defaultsToNull_CharSequence.equals(that.defaultsToNull_CharSequence) : that.defaultsToNull_CharSequence != null)) {
object.defaultsToNull(defaultsToNull_CharSequence);
}
if ((noDefaultSoItIsRequired_CharSequence != null ? !noDefaultSoItIsRequired_CharSequence.equals(that.noDefaultSoItIsRequired_CharSequence) : that.noDefaultSoItIsRequired_CharSequence != null)) {
object.noDefaultSoItIsRequired(noDefaultSoItIsRequired_CharSequence);
}
if ((objectWithDefaultAndNullable_String != null ? !objectWithDefaultAndNullable_String.equals(that.objectWithDefaultAndNullable_String) : that.objectWithDefaultAndNullable_String != null)) {
object.objectWithDefaultAndNullable(objectWithDefaultAndNullable_String);
}
if ((objectWithDefault_String != null ? !objectWithDefault_String.equals(that.objectWithDefault_String) : that.objectWithDefault_String != null)) {
object.objectWithDefault(objectWithDefault_String);
}
if ((primitivesHaveImplicitDefaultsAndCannotBeRequired_Int != that.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int)) {
object.primitivesHaveImplicitDefaultsAndCannotBeRequired(primitivesHaveImplicitDefaultsAndCannotBeRequired_Int);
}
}
@Override
public void handlePostBind(final PropDefaultsView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public PropDefaultsViewModel_ onBind(
OnModelBoundListener<PropDefaultsViewModel_, PropDefaultsView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(PropDefaultsView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public PropDefaultsViewModel_ onUnbind(
OnModelUnboundListener<PropDefaultsViewModel_, PropDefaultsView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final PropDefaultsView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public PropDefaultsViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<PropDefaultsViewModel_, PropDefaultsView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final PropDefaultsView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public PropDefaultsViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<PropDefaultsViewModel_, PropDefaultsView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see PropDefaultsView#defaultsToNull(CharSequence)
*/
public PropDefaultsViewModel_ defaultsToNull(@Nullable CharSequence defaultsToNull) {
onMutation();
this.defaultsToNull_CharSequence = defaultsToNull;
return this;
}
@Nullable
public CharSequence defaultsToNull() {
return defaultsToNull_CharSequence;
}
/**
* <i>Required.</i>
*
* @see PropDefaultsView#noDefaultSoItIsRequired(CharSequence)
*/
public PropDefaultsViewModel_ noDefaultSoItIsRequired(
@NonNull CharSequence noDefaultSoItIsRequired) {
if (noDefaultSoItIsRequired == null) {
throw new IllegalArgumentException("noDefaultSoItIsRequired cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(1);
onMutation();
this.noDefaultSoItIsRequired_CharSequence = noDefaultSoItIsRequired;
return this;
}
@NonNull
public CharSequence noDefaultSoItIsRequired() {
return noDefaultSoItIsRequired_CharSequence;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see PropDefaultsView#primitivesHaveImplicitDefaultsAndCannotBeRequired(int)
*/
public PropDefaultsViewModel_ primitivesHaveImplicitDefaultsAndCannotBeRequired(
int primitivesHaveImplicitDefaultsAndCannotBeRequired) {
onMutation();
this.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = primitivesHaveImplicitDefaultsAndCannotBeRequired;
return this;
}
public int primitivesHaveImplicitDefaultsAndCannotBeRequired() {
return primitivesHaveImplicitDefaultsAndCannotBeRequired_Int;
}
/**
* <i>Optional</i>: Default value is <b>{@value PropDefaultsView#PRIMITIVE_DEFAULT}</b>
*
* @see PropDefaultsView#primitiveWithExplicitDefault(int)
*/
public PropDefaultsViewModel_ primitiveWithExplicitDefault(int primitiveWithExplicitDefault) {
onMutation();
this.primitiveWithExplicitDefault_Int = primitiveWithExplicitDefault;
return this;
}
public int primitiveWithExplicitDefault() {
return primitiveWithExplicitDefault_Int;
}
/**
* <i>Optional</i>: Default value is <b>{@value PropDefaultsView#STRING_DEFAULT}</b>
*
* @see PropDefaultsView#objectWithDefault(String)
*/
public PropDefaultsViewModel_ objectWithDefault(@NonNull String objectWithDefault) {
if (objectWithDefault == null) {
throw new IllegalArgumentException("objectWithDefault cannot be null");
}
onMutation();
this.objectWithDefault_String = objectWithDefault;
return this;
}
@NonNull
public String objectWithDefault() {
return objectWithDefault_String;
}
/**
* <i>Optional</i>: Default value is <b>{@value PropDefaultsView#STRING_DEFAULT}</b>
*
* @see PropDefaultsView#objectWithDefaultAndNullable(String)
*/
public PropDefaultsViewModel_ objectWithDefaultAndNullable(
@Nullable String objectWithDefaultAndNullable) {
onMutation();
this.objectWithDefaultAndNullable_String = objectWithDefaultAndNullable;
return this;
}
@Nullable
public String objectWithDefaultAndNullable() {
return objectWithDefaultAndNullable_String;
}
@Override
public PropDefaultsViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public PropDefaultsViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public PropDefaultsViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public PropDefaultsViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public PropDefaultsViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public PropDefaultsViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public PropDefaultsViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public PropDefaultsViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public PropDefaultsViewModel_ show() {
super.show();
return this;
}
@Override
public PropDefaultsViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public PropDefaultsViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public PropDefaultsViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.defaultsToNull_CharSequence = (CharSequence) null;
this.noDefaultSoItIsRequired_CharSequence = null;
this.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = 0;
this.primitiveWithExplicitDefault_Int = PropDefaultsView.PRIMITIVE_DEFAULT;
this.objectWithDefault_String = PropDefaultsView.STRING_DEFAULT;
this.objectWithDefaultAndNullable_String = PropDefaultsView.STRING_DEFAULT;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof PropDefaultsViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
PropDefaultsViewModel_ that = (PropDefaultsViewModel_) 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 ((defaultsToNull_CharSequence != null ? !defaultsToNull_CharSequence.equals(that.defaultsToNull_CharSequence) : that.defaultsToNull_CharSequence != null)) {
return false;
}
if ((noDefaultSoItIsRequired_CharSequence != null ? !noDefaultSoItIsRequired_CharSequence.equals(that.noDefaultSoItIsRequired_CharSequence) : that.noDefaultSoItIsRequired_CharSequence != null)) {
return false;
}
if ((primitivesHaveImplicitDefaultsAndCannotBeRequired_Int != that.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int)) {
return false;
}
if ((primitiveWithExplicitDefault_Int != that.primitiveWithExplicitDefault_Int)) {
return false;
}
if ((objectWithDefault_String != null ? !objectWithDefault_String.equals(that.objectWithDefault_String) : that.objectWithDefault_String != null)) {
return false;
}
if ((objectWithDefaultAndNullable_String != null ? !objectWithDefaultAndNullable_String.equals(that.objectWithDefaultAndNullable_String) : that.objectWithDefaultAndNullable_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (defaultsToNull_CharSequence != null ? defaultsToNull_CharSequence.hashCode() : 0);
_result = 31 * _result + (noDefaultSoItIsRequired_CharSequence != null ? noDefaultSoItIsRequired_CharSequence.hashCode() : 0);
_result = 31 * _result + primitivesHaveImplicitDefaultsAndCannotBeRequired_Int;
_result = 31 * _result + primitiveWithExplicitDefault_Int;
_result = 31 * _result + (objectWithDefault_String != null ? objectWithDefault_String.hashCode() : 0);
_result = 31 * _result + (objectWithDefaultAndNullable_String != null ? objectWithDefaultAndNullable_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "PropDefaultsViewModel_{" +
"defaultsToNull_CharSequence=" + defaultsToNull_CharSequence +
", noDefaultSoItIsRequired_CharSequence=" + noDefaultSoItIsRequired_CharSequence +
", primitivesHaveImplicitDefaultsAndCannotBeRequired_Int=" + primitivesHaveImplicitDefaultsAndCannotBeRequired_Int +
", primitiveWithExplicitDefault_Int=" + primitiveWithExplicitDefault_Int +
", objectWithDefault_String=" + objectWithDefault_String +
", objectWithDefaultAndNullable_String=" + objectWithDefaultAndNullable_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,744 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAnnotation_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Deprecated;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
@Deprecated
public class ModelWithAnnotation_ extends ModelWithAnnotation implements GeneratedModel<Object>, ModelWithAnnotationBuilder {
private OnModelBoundListener<ModelWithAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelWithAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelWithAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelWithAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelWithAnnotation_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAnnotation_ onBind(OnModelBoundListener<ModelWithAnnotation_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelWithAnnotation_ onUnbind(
OnModelUnboundListener<ModelWithAnnotation_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAnnotation_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelWithAnnotation_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithAnnotation_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public ModelWithAnnotation_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotation_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotation_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotation_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelWithAnnotation_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotation_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelWithAnnotation_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelWithAnnotation_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelWithAnnotation_ show() {
super.show();
return this;
}
@Override
public ModelWithAnnotation_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelWithAnnotation_ hide() {
super.hide();
return this;
}
@Override
public ModelWithAnnotation_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelWithAnnotation_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelWithAnnotation_ that = (ModelWithAnnotation_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "ModelWithAnnotation_{" +
"}" + super.toString();
}
}
| 8,745 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelForRProcessingTest_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelForRProcessingTest_ extends ModelForRProcessingTest implements GeneratedModel<Object>, ModelForRProcessingTestBuilder {
private OnModelBoundListener<ModelForRProcessingTest_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelForRProcessingTest_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelForRProcessingTest_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelForRProcessingTest_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelForRProcessingTest_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelForRProcessingTest_ onBind(
OnModelBoundListener<ModelForRProcessingTest_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelForRProcessingTest_ onUnbind(
OnModelUnboundListener<ModelForRProcessingTest_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelForRProcessingTest_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelForRProcessingTest_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelForRProcessingTest_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelForRProcessingTest_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelForRProcessingTest_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public ModelForRProcessingTest_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelForRProcessingTest_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelForRProcessingTest_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelForRProcessingTest_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelForRProcessingTest_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelForRProcessingTest_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelForRProcessingTest_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelForRProcessingTest_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelForRProcessingTest_ show() {
super.show();
return this;
}
@Override
public ModelForRProcessingTest_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelForRProcessingTest_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.res;
}
@Override
public ModelForRProcessingTest_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelForRProcessingTest_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelForRProcessingTest_ that = (ModelForRProcessingTest_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "ModelForRProcessingTest_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,746 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/EpoxyModelGroupWithAnnotations_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Collection;
/**
* Generated file. Do not modify!
*/
public class EpoxyModelGroupWithAnnotations_ extends EpoxyModelGroupWithAnnotations implements GeneratedModel<ModelGroupHolder>, EpoxyModelGroupWithAnnotationsBuilder {
private OnModelBoundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelVisibilityChangedListener_epoxyGeneratedModel;
public EpoxyModelGroupWithAnnotations_(int layoutRes,
Collection<? extends EpoxyModel<?>> models) {
super(layoutRes, models);
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final ModelGroupHolder object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final ModelGroupHolder object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public EpoxyModelGroupWithAnnotations_ onBind(
OnModelBoundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(ModelGroupHolder object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public EpoxyModelGroupWithAnnotations_ onUnbind(
OnModelUnboundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final ModelGroupHolder object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public EpoxyModelGroupWithAnnotations_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final ModelGroupHolder object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public EpoxyModelGroupWithAnnotations_ onVisibilityChanged(
OnModelVisibilityChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public EpoxyModelGroupWithAnnotations_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public EpoxyModelGroupWithAnnotations_ shouldSaveViewState(boolean p0) {
super.shouldSaveViewState(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(long p0) {
super.id(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ show() {
super.show();
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ hide() {
super.hide();
return this;
}
@Override
public EpoxyModelGroupWithAnnotations_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof EpoxyModelGroupWithAnnotations_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
EpoxyModelGroupWithAnnotations_ that = (EpoxyModelGroupWithAnnotations_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "EpoxyModelGroupWithAnnotations_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,747 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/OnVisibilityChangedViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class OnVisibilityChangedViewModel_ extends EpoxyModel<OnVisibilityChangedView> implements GeneratedModel<OnVisibilityChangedView>, OnVisibilityChangedViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private CharSequence title_CharSequence;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setTitle");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final OnVisibilityChangedView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final OnVisibilityChangedView object) {
super.bind(object);
object.setTitle(title_CharSequence);
}
@Override
public void bind(final OnVisibilityChangedView object, EpoxyModel previousModel) {
if (!(previousModel instanceof OnVisibilityChangedViewModel_)) {
bind(object);
return;
}
OnVisibilityChangedViewModel_ that = (OnVisibilityChangedViewModel_) previousModel;
super.bind(object);
if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
object.setTitle(title_CharSequence);
}
}
@Override
public void handlePostBind(final OnVisibilityChangedView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public OnVisibilityChangedViewModel_ onBind(
OnModelBoundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(OnVisibilityChangedView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public OnVisibilityChangedViewModel_ onUnbind(
OnModelUnboundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final OnVisibilityChangedView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public OnVisibilityChangedViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final OnVisibilityChangedView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
object.onVisibilityChanged1(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
object.onVisibilityChanged2(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public OnVisibilityChangedViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see OnVisibilityChangedView#setTitle(CharSequence)
*/
public OnVisibilityChangedViewModel_ title(@NonNull CharSequence title) {
if (title == null) {
throw new IllegalArgumentException("title cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.title_CharSequence = title;
return this;
}
@NonNull
public CharSequence title() {
return title_CharSequence;
}
@Override
public OnVisibilityChangedViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public OnVisibilityChangedViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public OnVisibilityChangedViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public OnVisibilityChangedViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ show() {
super.show();
return this;
}
@Override
public OnVisibilityChangedViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public OnVisibilityChangedViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public OnVisibilityChangedViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.title_CharSequence = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof OnVisibilityChangedViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
OnVisibilityChangedViewModel_ that = (OnVisibilityChangedViewModel_) 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 ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (title_CharSequence != null ? title_CharSequence.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "OnVisibilityChangedViewModel_{" +
"title_CharSequence=" + title_CharSequence +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,748 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/DefaultPackageLayoutPatternViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class DefaultPackageLayoutPatternViewModel_ extends EpoxyModel<DefaultPackageLayoutPatternView> implements GeneratedModel<DefaultPackageLayoutPatternView>, DefaultPackageLayoutPatternViewModelBuilder {
private OnModelBoundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final DefaultPackageLayoutPatternView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final DefaultPackageLayoutPatternView object) {
super.bind(object);
}
@Override
public void bind(final DefaultPackageLayoutPatternView object, EpoxyModel previousModel) {
if (!(previousModel instanceof DefaultPackageLayoutPatternViewModel_)) {
bind(object);
return;
}
DefaultPackageLayoutPatternViewModel_ that = (DefaultPackageLayoutPatternViewModel_) previousModel;
super.bind(object);
}
@Override
public void handlePostBind(final DefaultPackageLayoutPatternView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DefaultPackageLayoutPatternViewModel_ onBind(
OnModelBoundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(DefaultPackageLayoutPatternView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public DefaultPackageLayoutPatternViewModel_ onUnbind(
OnModelUnboundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final DefaultPackageLayoutPatternView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DefaultPackageLayoutPatternViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final DefaultPackageLayoutPatternView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public DefaultPackageLayoutPatternViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ show() {
super.show();
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public DefaultPackageLayoutPatternViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return R.layout.default_package_layout_pattern_view;
}
@Override
public DefaultPackageLayoutPatternViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof DefaultPackageLayoutPatternViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
DefaultPackageLayoutPatternViewModel_ that = (DefaultPackageLayoutPatternViewModel_) 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;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "DefaultPackageLayoutPatternViewModel_{" +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,749 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethod_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class GenerateDefaultLayoutMethod_ extends GenerateDefaultLayoutMethod implements GeneratedModel<Object>, GenerateDefaultLayoutMethodBuilder {
private OnModelBoundListener<GenerateDefaultLayoutMethod_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<GenerateDefaultLayoutMethod_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethod_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethod_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public GenerateDefaultLayoutMethod_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethod_ onBind(
OnModelBoundListener<GenerateDefaultLayoutMethod_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public GenerateDefaultLayoutMethod_ onUnbind(
OnModelUnboundListener<GenerateDefaultLayoutMethod_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethod_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethod_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public GenerateDefaultLayoutMethod_ onVisibilityChanged(
OnModelVisibilityChangedListener<GenerateDefaultLayoutMethod_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public GenerateDefaultLayoutMethod_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
@Override
public GenerateDefaultLayoutMethod_ id(long p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ show() {
super.show();
return this;
}
@Override
public GenerateDefaultLayoutMethod_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public GenerateDefaultLayoutMethod_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public GenerateDefaultLayoutMethod_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenerateDefaultLayoutMethod_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
GenerateDefaultLayoutMethod_ that = (GenerateDefaultLayoutMethod_) 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 ((value != that.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
return _result;
}
@Override
public String toString() {
return "GenerateDefaultLayoutMethod_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,750 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropCallbackPropViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropCallbackPropViewModel_ extends EpoxyModel<TestFieldPropCallbackPropView> implements GeneratedModel<TestFieldPropCallbackPropView>, TestFieldPropCallbackPropViewModelBuilder {
private OnModelBoundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private View.OnClickListener value_OnClickListener = (View.OnClickListener) null;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropCallbackPropView buildView(ViewGroup parent) {
TestFieldPropCallbackPropView v = new TestFieldPropCallbackPropView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final TestFieldPropCallbackPropView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropCallbackPropView object) {
super.bind(object);
object.value = value_OnClickListener;
}
@Override
public void bind(final TestFieldPropCallbackPropView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropCallbackPropViewModel_)) {
bind(object);
return;
}
TestFieldPropCallbackPropViewModel_ that = (TestFieldPropCallbackPropViewModel_) previousModel;
super.bind(object);
if (((value_OnClickListener == null) != (that.value_OnClickListener == null))) {
object.value = value_OnClickListener;
}
}
@Override
public void handlePostBind(final TestFieldPropCallbackPropView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropCallbackPropViewModel_ onBind(
OnModelBoundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropCallbackPropView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.value = (View.OnClickListener) null;
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropCallbackPropViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropCallbackPropView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropCallbackPropViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestFieldPropCallbackPropView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropCallbackPropViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestFieldPropCallbackPropViewModel_ value(
@Nullable final OnModelClickListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> value) {
onMutation();
if (value == null) {
this.value_OnClickListener = null;
}
else {
this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value);
}
return this;
}
/**
* <i>Optional</i>: Default value is (View.OnClickListener) null
*
* @see TestFieldPropCallbackPropView#value
*/
public TestFieldPropCallbackPropViewModel_ value(@Nullable View.OnClickListener value) {
onMutation();
this.value_OnClickListener = value;
return this;
}
@Nullable
public View.OnClickListener value() {
return value_OnClickListener;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence p0,
@Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropCallbackPropViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropCallbackPropViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropCallbackPropViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_OnClickListener = (View.OnClickListener) null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropCallbackPropViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropCallbackPropViewModel_ that = (TestFieldPropCallbackPropViewModel_) 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 (((value_OnClickListener == null) != (that.value_OnClickListener == null))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (value_OnClickListener != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "TestFieldPropCallbackPropViewModel_{" +
"value_OnClickListener=" + value_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,751 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelDoNotUseInToString_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ModelDoNotUseInToString_ extends ModelDoNotUseInToString implements GeneratedModel<Object>, ModelDoNotUseInToStringBuilder {
private OnModelBoundListener<ModelDoNotUseInToString_, Object> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelDoNotUseInToString_, Object> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelDoNotUseInToString_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelDoNotUseInToString_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel;
public ModelDoNotUseInToString_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Object object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelDoNotUseInToString_ onBind(
OnModelBoundListener<ModelDoNotUseInToString_, Object> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Object object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelDoNotUseInToString_ onUnbind(
OnModelUnboundListener<ModelDoNotUseInToString_, Object> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Object object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelDoNotUseInToString_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelDoNotUseInToString_, Object> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Object object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelDoNotUseInToString_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelDoNotUseInToString_, Object> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelDoNotUseInToString_ value(int value) {
onMutation();
super.value = value;
return this;
}
public int value() {
return value;
}
public ModelDoNotUseInToString_ value2(int value2) {
onMutation();
super.value2 = value2;
return this;
}
public int value2() {
return value2;
}
public ModelDoNotUseInToString_ value3(String value3) {
onMutation();
super.value3 = value3;
return this;
}
public String value3() {
return value3;
}
@Override
public ModelDoNotUseInToString_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelDoNotUseInToString_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelDoNotUseInToString_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelDoNotUseInToString_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ show() {
super.show();
return this;
}
@Override
public ModelDoNotUseInToString_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelDoNotUseInToString_ hide() {
super.hide();
return this;
}
@Override
public ModelDoNotUseInToString_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.value = 0;
super.value2 = 0;
super.value3 = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelDoNotUseInToString_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelDoNotUseInToString_ that = (ModelDoNotUseInToString_) 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 ((value != that.value)) {
return false;
}
if ((value2 != that.value2)) {
return false;
}
if ((value3 != null ? !value3.equals(that.value3) : that.value3 != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value;
_result = 31 * _result + value2;
_result = 31 * _result + (value3 != null ? value3.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "ModelDoNotUseInToString_{" +
"value=" + value +
"}" + super.toString();
}
}
| 8,752 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ControllerWithAutoModel_EpoxyHelper.java | package com.airbnb.epoxy.adapter;
import com.airbnb.epoxy.BasicModelWithAttribute_;
import com.airbnb.epoxy.ControllerHelper;
import com.airbnb.epoxy.EpoxyModel;
import java.lang.IllegalStateException;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ControllerWithAutoModel_EpoxyHelper extends ControllerHelper<ControllerWithAutoModel> {
private final ControllerWithAutoModel controller;
private EpoxyModel modelWithAttribute2;
private EpoxyModel modelWithAttribute1;
public ControllerWithAutoModel_EpoxyHelper(ControllerWithAutoModel controller) {
this.controller = controller;
}
@Override
public void resetAutoModels() {
validateModelsHaveNotChanged();
controller.modelWithAttribute2 = new BasicModelWithAttribute_();
controller.modelWithAttribute2.id(-1);
controller.modelWithAttribute1 = new BasicModelWithAttribute_();
controller.modelWithAttribute1.id(-2);
saveModelsForNextValidation();
}
private void validateModelsHaveNotChanged() {
validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -1);
validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -2);
validateModelHashCodesHaveNotChanged(controller);
}
private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject,
String fieldName, int id) {
if (expectedObject != actualObject) {
throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
if (actualObject != null && actualObject.id() != id) {
throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
}
private void saveModelsForNextValidation() {
modelWithAttribute2 = controller.modelWithAttribute2;
modelWithAttribute1 = controller.modelWithAttribute1;
}
}
| 8,753 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropNullOnRecycleOptionViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import javax.annotation.Nullable;
/**
* Generated file. Do not modify!
*/
public class TestFieldPropNullOnRecycleOptionViewModel_ extends EpoxyModel<TestFieldPropNullOnRecycleOptionView> implements GeneratedModel<TestFieldPropNullOnRecycleOptionView>, TestFieldPropNullOnRecycleOptionViewModelBuilder {
private OnModelBoundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private View.OnClickListener value_OnClickListener = (View.OnClickListener) null;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestFieldPropNullOnRecycleOptionView buildView(ViewGroup parent) {
TestFieldPropNullOnRecycleOptionView v = new TestFieldPropNullOnRecycleOptionView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder,
final TestFieldPropNullOnRecycleOptionView object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestFieldPropNullOnRecycleOptionView object) {
super.bind(object);
object.value = value_OnClickListener;
}
@Override
public void bind(final TestFieldPropNullOnRecycleOptionView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestFieldPropNullOnRecycleOptionViewModel_)) {
bind(object);
return;
}
TestFieldPropNullOnRecycleOptionViewModel_ that = (TestFieldPropNullOnRecycleOptionViewModel_) previousModel;
super.bind(object);
if ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) {
object.value = value_OnClickListener;
}
}
@Override
public void handlePostBind(final TestFieldPropNullOnRecycleOptionView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
object.call();
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropNullOnRecycleOptionViewModel_ onBind(
OnModelBoundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestFieldPropNullOnRecycleOptionView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.value = (View.OnClickListener) null;
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestFieldPropNullOnRecycleOptionViewModel_ onUnbind(
OnModelUnboundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState,
final TestFieldPropNullOnRecycleOptionView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropNullOnRecycleOptionViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestFieldPropNullOnRecycleOptionView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestFieldPropNullOnRecycleOptionViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestFieldPropNullOnRecycleOptionViewModel_ value(
@Nullable final OnModelClickListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> value) {
onMutation();
if (value == null) {
this.value_OnClickListener = null;
}
else {
this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value);
}
return this;
}
/**
* <i>Optional</i>: Default value is (View.OnClickListener) null
*
* @see TestFieldPropNullOnRecycleOptionView#value
*/
public TestFieldPropNullOnRecycleOptionViewModel_ value(@Nullable View.OnClickListener value) {
onMutation();
this.value_OnClickListener = value;
return this;
}
@Nullable
public View.OnClickListener value() {
return value_OnClickListener;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(@androidx.annotation.Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(
@androidx.annotation.Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(
@androidx.annotation.Nullable CharSequence p0,
@androidx.annotation.Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ id(
@androidx.annotation.Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ show() {
super.show();
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestFieldPropNullOnRecycleOptionViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_OnClickListener = (View.OnClickListener) null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestFieldPropNullOnRecycleOptionViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestFieldPropNullOnRecycleOptionViewModel_ that = (TestFieldPropNullOnRecycleOptionViewModel_) 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 ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (value_OnClickListener != null ? value_OnClickListener.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestFieldPropNullOnRecycleOptionViewModel_{" +
"value_OnClickListener=" + value_OnClickListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,754 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAllFieldTypesBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.Boolean;
import java.lang.Byte;
import java.lang.CharSequence;
import java.lang.Character;
import java.lang.Double;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Number;
import java.lang.Object;
import java.lang.Short;
import java.lang.String;
import java.util.List;
@EpoxyBuildScope
public interface ModelWithAllFieldTypesBuilder {
ModelWithAllFieldTypesBuilder onBind(
OnModelBoundListener<ModelWithAllFieldTypes_, Object> listener);
ModelWithAllFieldTypesBuilder onUnbind(
OnModelUnboundListener<ModelWithAllFieldTypes_, Object> listener);
ModelWithAllFieldTypesBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> listener);
ModelWithAllFieldTypesBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> listener);
ModelWithAllFieldTypesBuilder valueInt(int valueInt);
ModelWithAllFieldTypesBuilder valueInteger(Integer valueInteger);
ModelWithAllFieldTypesBuilder valueShort(short valueShort);
ModelWithAllFieldTypesBuilder valueShortWrapper(Short valueShortWrapper);
ModelWithAllFieldTypesBuilder valueChar(char valueChar);
ModelWithAllFieldTypesBuilder valueCharacter(Character valueCharacter);
ModelWithAllFieldTypesBuilder valuebByte(byte valuebByte);
ModelWithAllFieldTypesBuilder valueByteWrapper(Byte valueByteWrapper);
ModelWithAllFieldTypesBuilder valueLong(long valueLong);
ModelWithAllFieldTypesBuilder valueLongWrapper(Long valueLongWrapper);
ModelWithAllFieldTypesBuilder valueDouble(double valueDouble);
ModelWithAllFieldTypesBuilder valueDoubleWrapper(Double valueDoubleWrapper);
ModelWithAllFieldTypesBuilder valueFloat(float valueFloat);
ModelWithAllFieldTypesBuilder valueFloatWrapper(Float valueFloatWrapper);
ModelWithAllFieldTypesBuilder valueBoolean(boolean valueBoolean);
ModelWithAllFieldTypesBuilder valueBooleanWrapper(Boolean valueBooleanWrapper);
ModelWithAllFieldTypesBuilder valueIntArray(int[] valueIntArray);
ModelWithAllFieldTypesBuilder valueObjectArray(Object[] valueObjectArray);
ModelWithAllFieldTypesBuilder valueString(String valueString);
ModelWithAllFieldTypesBuilder valueObject(Object valueObject);
ModelWithAllFieldTypesBuilder valueList(List<String> valueList);
ModelWithAllFieldTypesBuilder id(long p0);
ModelWithAllFieldTypesBuilder id(@Nullable Number... p0);
ModelWithAllFieldTypesBuilder id(long p0, long p1);
ModelWithAllFieldTypesBuilder id(@Nullable CharSequence p0);
ModelWithAllFieldTypesBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
ModelWithAllFieldTypesBuilder id(@Nullable CharSequence p0, long p1);
ModelWithAllFieldTypesBuilder layout(@LayoutRes int p0);
ModelWithAllFieldTypesBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,755 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
import org.jetbrains.annotations.Nullable;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable("") String sectionId);
SourceViewModelBuilder processorTest2ValueProtected(int processorTest2ValueProtected);
SourceViewModelBuilder processorTest2ValuePublic(int processorTest2ValuePublic);
SourceViewModelBuilder someAttributeAlsoWithSetter(int someAttributeAlsoWithSetter);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@androidx.annotation.Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key, long id);
SourceViewModelBuilder spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,756 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import com.airbnb.epoxy.processortest2.ProcessorTest2Model;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import org.jetbrains.annotations.Nullable;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends ProcessorTest2Model<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable("")
private String sectionId_String = (String) null;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable("") String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable("")
public String sectionId() {
return sectionId_String;
}
public SourceViewModel_ processorTest2ValueProtected(int processorTest2ValueProtected) {
onMutation();
super.processorTest2ValueProtected = processorTest2ValueProtected;
return this;
}
public int processorTest2ValueProtected() {
return processorTest2ValueProtected;
}
public SourceViewModel_ processorTest2ValuePublic(int processorTest2ValuePublic) {
onMutation();
super.processorTest2ValuePublic = processorTest2ValuePublic;
return this;
}
public int processorTest2ValuePublic() {
return processorTest2ValuePublic;
}
public SourceViewModel_ someAttributeAlsoWithSetter(int someAttributeAlsoWithSetter) {
onMutation();
super.someAttributeAlsoWithSetter = someAttributeAlsoWithSetter;
super.someAttributeAlsoWithSetter(someAttributeAlsoWithSetter);
return this;
}
public int someAttributeAlsoWithSetter() {
return someAttributeAlsoWithSetter;
}
public int someFinalAttribute() {
return someFinalAttribute;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
super.processorTest2ValueProtected = 0;
super.processorTest2ValuePublic = 0;
super.someAttributeAlsoWithSetter = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((processorTest2ValueProtected != that.processorTest2ValueProtected)) {
return false;
}
if ((processorTest2ValuePublic != that.processorTest2ValuePublic)) {
return false;
}
if ((someAttributeAlsoWithSetter != that.someAttributeAlsoWithSetter)) {
return false;
}
if ((someFinalAttribute != that.someFinalAttribute)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + processorTest2ValueProtected;
_result = 31 * _result + processorTest2ValuePublic;
_result = 31 * _result + someAttributeAlsoWithSetter;
_result = 31 * _result + someFinalAttribute;
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", processorTest2ValueProtected=" + processorTest2ValueProtected +
", processorTest2ValuePublic=" + processorTest2ValuePublic +
", someAttributeAlsoWithSetter=" + someAttributeAlsoWithSetter +
", someFinalAttribute=" + someFinalAttribute +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,757 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable String sectionId);
SourceViewModelBuilder processorTest2ValueProtected(int processorTest2ValueProtected);
SourceViewModelBuilder processorTest2ValuePublic(int processorTest2ValuePublic);
SourceViewModelBuilder someAttributeAlsoWithSetter(int someAttributeAlsoWithSetter);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,758 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaClassPath/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import com.airbnb.epoxy.processortest2.ProcessorTest2Model;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends ProcessorTest2Model<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private String sectionId_String = (String) null;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable
public String sectionId() {
return sectionId_String;
}
public SourceViewModel_ processorTest2ValueProtected(int processorTest2ValueProtected) {
onMutation();
super.processorTest2ValueProtected = processorTest2ValueProtected;
return this;
}
public int processorTest2ValueProtected() {
return processorTest2ValueProtected;
}
public SourceViewModel_ processorTest2ValuePublic(int processorTest2ValuePublic) {
onMutation();
super.processorTest2ValuePublic = processorTest2ValuePublic;
return this;
}
public int processorTest2ValuePublic() {
return processorTest2ValuePublic;
}
public SourceViewModel_ someAttributeAlsoWithSetter(int someAttributeAlsoWithSetter) {
onMutation();
super.someAttributeAlsoWithSetter = someAttributeAlsoWithSetter;
super.someAttributeAlsoWithSetter(someAttributeAlsoWithSetter);
return this;
}
public int someAttributeAlsoWithSetter() {
return someAttributeAlsoWithSetter;
}
public int someFinalAttribute() {
return someFinalAttribute;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
super.processorTest2ValueProtected = 0;
super.processorTest2ValuePublic = 0;
super.someAttributeAlsoWithSetter = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((processorTest2ValueProtected != that.processorTest2ValueProtected)) {
return false;
}
if ((processorTest2ValuePublic != that.processorTest2ValuePublic)) {
return false;
}
if ((someAttributeAlsoWithSetter != that.someAttributeAlsoWithSetter)) {
return false;
}
if ((someFinalAttribute != that.someFinalAttribute)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + processorTest2ValueProtected;
_result = 31 * _result + processorTest2ValuePublic;
_result = 31 * _result + someAttributeAlsoWithSetter;
_result = 31 * _result + someFinalAttribute;
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", processorTest2ValueProtected=" + processorTest2ValueProtected +
", processorTest2ValuePublic=" + processorTest2ValuePublic +
", someAttributeAlsoWithSetter=" + someAttributeAlsoWithSetter +
", someFinalAttribute=" + someFinalAttribute +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,759 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder foo(int foo);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@Nullable CharSequence key);
SourceViewModelBuilder id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@Nullable CharSequence key, long id);
SourceViewModelBuilder spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,760 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Deprecated;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
@Deprecated(
since = "",
forRemoval = false
)
public class SourceViewModel_ extends EpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int foo_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.foo(foo_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((foo_Int != that.foo_Int)) {
object.foo(foo_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see SourceView#foo(int)
*/
public SourceViewModel_ foo(int foo) {
onMutation();
this.foo_Int = foo;
return this;
}
public int foo() {
return foo_Int;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.foo_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((foo_Int != that.foo_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + foo_Int;
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"foo_Int=" + foo_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,761 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder foo(int foo);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,762 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.ReplaceWith;
/**
* Generated file. Do not modify!
*/
@Deprecated(
message = "some message",
replaceWith = @ReplaceWith(expression = "", imports = {}),
level = DeprecationLevel.WARNING
)
public class SourceViewModel_ extends EpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int foo_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.foo(foo_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((foo_Int != that.foo_Int)) {
object.foo(foo_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see SourceView#foo(int)
*/
public SourceViewModel_ foo(int foo) {
onMutation();
this.foo_Int = foo;
return this;
}
public int foo() {
return foo_Int;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.foo_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((foo_Int != that.foo_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + foo_Int;
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"foo_Int=" + foo_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,763 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@NonNull String sectionId);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@Nullable CharSequence key);
SourceViewModelBuilder id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@Nullable CharSequence key, long id);
SourceViewModelBuilder layout(@LayoutRes int layoutRes);
SourceViewModelBuilder spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,764 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java/SourceViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends EpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String sectionId_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for sectionId");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.sectionId = sectionId_String;
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.sectionId = sectionId_String;
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see SourceView#sectionId
*/
public SourceViewModel_ sectionId(@NonNull String sectionId) {
if (sectionId == null) {
throw new IllegalArgumentException("sectionId cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.sectionId_String = sectionId;
return this;
}
@NonNull
public String sectionId() {
return sectionId_String;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
super.layout(layoutRes);
return this;
}
@Override
public SourceViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.sectionId_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,765 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java/SourceView.java | package com.airbnb.epoxy;
import android.content.Context;
import android.widget.FrameLayout;
@ModelView(defaultLayout = 1)
public class SourceView extends FrameLayout {
public SourceView(Context context) {
super(context);
}
@SuppressWarnings("unused")
@ModelProp String sectionId;
} | 8,766 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@NonNull String sectionId);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder layout(@LayoutRes int p0);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,767 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/annotationsAreCopied_java/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends EpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String sectionId_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for sectionId");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.sectionId = sectionId_String;
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.sectionId = sectionId_String;
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see SourceView#sectionId
*/
public SourceViewModel_ sectionId(@NonNull String sectionId) {
if (sectionId == null) {
throw new IllegalArgumentException("sectionId cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.sectionId_String = sectionId;
return this;
}
@NonNull
public String sectionId() {
return sectionId_String;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.sectionId_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,768 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
import org.jetbrains.annotations.Nullable;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable("") String sectionId);
SourceViewModelBuilder baseViewProp(int baseViewProp);
SourceViewModelBuilder showDividerWithSetter(Boolean showDividerWithSetter);
SourceViewModelBuilder showDividerWithOverriddenMethod(boolean showDivider);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@androidx.annotation.Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key, long id);
SourceViewModelBuilder spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,769 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import org.jetbrains.annotations.Nullable;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends AirEpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable("")
private String sectionId_String = (String) null;
private int baseViewProp_Int = 0;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
object.baseViewProp(baseViewProp_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
object.baseViewProp(baseViewProp_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable("") String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable("")
public String sectionId() {
return sectionId_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewProp(int)
*/
public SourceViewModel_ baseViewProp(int baseViewProp) {
onMutation();
this.baseViewProp_Int = baseViewProp;
return this;
}
public int baseViewProp() {
return baseViewProp_Int;
}
public SourceViewModel_ showDividerWithSetter(Boolean showDividerWithSetter) {
onMutation();
super.setShowDividerWithSetter(showDividerWithSetter);
return this;
}
public Boolean showDividerWithSetter() {
return super.getShowDividerWithSetter();
}
@Override
public SourceViewModel_ showDividerWithOverriddenMethod(boolean showDivider) {
super.showDividerWithOverriddenMethod(showDivider);
return this;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
this.baseViewProp_Int = 0;
super.setShowDivider(null);
super.setShowDividerWithSetter(null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
return false;
}
if ((getShowDivider() != null ? !getShowDivider().equals(that.getShowDivider()) : that.getShowDivider() != null)) {
return false;
}
if ((getShowDividerWithSetter() != null ? !getShowDividerWithSetter().equals(that.getShowDividerWithSetter()) : that.getShowDividerWithSetter() != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + baseViewProp_Int;
_result = 31 * _result + (getShowDivider() != null ? getShowDivider().hashCode() : 0);
_result = 31 * _result + (getShowDividerWithSetter() != null ? getShowDividerWithSetter().hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", baseViewProp_Int=" + baseViewProp_Int +
", showDivider=" + getShowDivider() +
", showDividerWithSetter=" + getShowDividerWithSetter() +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,770 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources/AirEpoxyModel.java | package com.airbnb.epoxy;
import android.view.View;
import com.airbnb.epoxy.EpoxyAttribute.Option;
import androidx.annotation.Nullable;
import android.view.View;
public abstract class AirEpoxyModel<T extends View> extends EpoxyModel<T> {
/**
* Whether the divider should be shown on the bound view. This should only be set if {@link #supportsDividers()} is true for your model.
* <p>
* If this is left as null then the divider will default to hidden.
* <p>
* The getter and setter are both omitted so the {@link AirModel} divider methods can be used instead.
*/
@EpoxyAttribute({Option.NoGetter, Option.NoSetter}) protected Boolean showDivider;
/**
* The number of items that should be shown on screen. This assumes the model is used in a horizontal RecyclerView (aka {@link Carousel}), and the
* view will have its width resized so that the appropriate number of items fit on screen.
* <p>
* We don't generate a getter since this class defines one, so it is accessible with just a `AirEpoxyModel` reference.
*/
@Nullable @EpoxyAttribute(Option.NoGetter) protected SomeType numCarouselItemsShown;
public AirEpoxyModel<T> numCarouselItemsShown(SomeType numCarouselItemsShown) {
this.numCarouselItemsShown = numCarouselItemsShown;
return this;
}
@Nullable
public SomeType numCarouselItemsShown() {
return numCarouselItemsShown;
}
public static class SomeType {
}
} | 8,771 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable String sectionId);
SourceViewModelBuilder baseViewProp(int baseViewProp);
SourceViewModelBuilder numCarouselItemsShown(
@Nullable AirEpoxyModel.SomeType numCarouselItemsShown);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,772 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectlyJavaSources/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends AirEpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private String sectionId_String = (String) null;
private int baseViewProp_Int = 0;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
object.baseViewProp(baseViewProp_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
object.baseViewProp(baseViewProp_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable
public String sectionId() {
return sectionId_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewProp(int)
*/
public SourceViewModel_ baseViewProp(int baseViewProp) {
onMutation();
this.baseViewProp_Int = baseViewProp;
return this;
}
public int baseViewProp() {
return baseViewProp_Int;
}
/**
* The number of items that should be shown on screen. This assumes the model is used in a horizontal RecyclerView (aka {@link Carousel}), and the
* view will have its width resized so that the appropriate number of items fit on screen.
* <p>
* We don't generate a getter since this class defines one, so it is accessible with just a `AirEpoxyModel` reference.
*/
public SourceViewModel_ numCarouselItemsShown(
@Nullable AirEpoxyModel.SomeType numCarouselItemsShown) {
onMutation();
super.numCarouselItemsShown = numCarouselItemsShown;
return this;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
this.baseViewProp_Int = 0;
super.showDivider = null;
super.numCarouselItemsShown = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
return false;
}
if ((showDivider != null ? !showDivider.equals(that.showDivider) : that.showDivider != null)) {
return false;
}
if ((numCarouselItemsShown != null ? !numCarouselItemsShown.equals(that.numCarouselItemsShown) : that.numCarouselItemsShown != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + baseViewProp_Int;
_result = 31 * _result + (showDivider != null ? showDivider.hashCode() : 0);
_result = 31 * _result + (numCarouselItemsShown != null ? numCarouselItemsShown.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", baseViewProp_Int=" + baseViewProp_Int +
", showDivider=" + showDivider +
", numCarouselItemsShown=" + numCarouselItemsShown +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,773 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
import org.jetbrains.annotations.Nullable;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable("") String sectionId);
SourceViewModelBuilder baseViewProp(int baseViewProp);
SourceViewModelBuilder baseViewPropWithDefaultParamValue(int baseViewPropWithDefaultParamValue);
SourceViewModelBuilder showDividerWithSetter(Boolean showDividerWithSetter);
SourceViewModelBuilder showDividerWithOverriddenMethod(boolean showDivider);
SourceViewModelBuilder showDivider(boolean showDivider);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@androidx.annotation.Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key, long id);
SourceViewModelBuilder spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,774 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import org.jetbrains.annotations.Nullable;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends AirEpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable("")
private String sectionId_String = (String) null;
private int baseViewProp_Int = 0;
private int baseViewPropWithDefaultParamValue_Int = 0;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
object.baseViewPropWithDefaultParamValue(baseViewPropWithDefaultParamValue_Int);
object.baseViewProp(baseViewProp_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
if ((baseViewPropWithDefaultParamValue_Int != that.baseViewPropWithDefaultParamValue_Int)) {
object.baseViewPropWithDefaultParamValue(baseViewPropWithDefaultParamValue_Int);
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
object.baseViewProp(baseViewProp_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable("") String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable("")
public String sectionId() {
return sectionId_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewProp(int)
*/
public SourceViewModel_ baseViewProp(int baseViewProp) {
onMutation();
this.baseViewProp_Int = baseViewProp;
return this;
}
public int baseViewProp() {
return baseViewProp_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewPropWithDefaultParamValue(int)
*/
public SourceViewModel_ baseViewPropWithDefaultParamValue(int baseViewPropWithDefaultParamValue) {
onMutation();
this.baseViewPropWithDefaultParamValue_Int = baseViewPropWithDefaultParamValue;
return this;
}
public int baseViewPropWithDefaultParamValue() {
return baseViewPropWithDefaultParamValue_Int;
}
public SourceViewModel_ showDividerWithSetter(Boolean showDividerWithSetter) {
onMutation();
super.setShowDividerWithSetter(showDividerWithSetter);
return this;
}
public Boolean showDividerWithSetter() {
return super.getShowDividerWithSetter();
}
@Override
public SourceViewModel_ showDividerWithOverriddenMethod(boolean showDivider) {
super.showDividerWithOverriddenMethod(showDivider);
return this;
}
@Override
public SourceViewModel_ showDivider(boolean showDivider) {
super.showDivider(showDivider);
return this;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
this.baseViewProp_Int = 0;
this.baseViewPropWithDefaultParamValue_Int = 0;
super.setShowDivider(null);
super.setShowDividerWithSetter(null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
return false;
}
if ((baseViewPropWithDefaultParamValue_Int != that.baseViewPropWithDefaultParamValue_Int)) {
return false;
}
if ((getShowDivider() != null ? !getShowDivider().equals(that.getShowDivider()) : that.getShowDivider() != null)) {
return false;
}
if ((getShowDividerWithSetter() != null ? !getShowDividerWithSetter().equals(that.getShowDividerWithSetter()) : that.getShowDividerWithSetter() != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + baseViewProp_Int;
_result = 31 * _result + baseViewPropWithDefaultParamValue_Int;
_result = 31 * _result + (getShowDivider() != null ? getShowDivider().hashCode() : 0);
_result = 31 * _result + (getShowDividerWithSetter() != null ? getShowDividerWithSetter().hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", baseViewProp_Int=" + baseViewProp_Int +
", baseViewPropWithDefaultParamValue_Int=" + baseViewPropWithDefaultParamValue_Int +
", showDivider=" + getShowDivider() +
", showDividerWithSetter=" + getShowDividerWithSetter() +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,775 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import androidx.annotation.Nullable;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable String sectionId);
SourceViewModelBuilder baseViewProp(int baseViewProp);
SourceViewModelBuilder baseViewPropWithDefaultParamValue(int baseViewPropWithDefaultParamValue);
SourceViewModelBuilder showDividerWithSetter(@Nullable Boolean showDividerWithSetter);
SourceViewModelBuilder showDividerWithOverriddenMethod(boolean showDivider);
SourceViewModelBuilder showDivider(boolean showDivider);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,776 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/inheritingAttributesWorksCorrectly/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends AirEpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private String sectionId_String = (String) null;
private int baseViewProp_Int = 0;
private int baseViewPropWithDefaultParamValue_Int = 0;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
object.baseViewPropWithDefaultParamValue(baseViewPropWithDefaultParamValue_Int);
object.baseViewProp(baseViewProp_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
if ((baseViewPropWithDefaultParamValue_Int != that.baseViewPropWithDefaultParamValue_Int)) {
object.baseViewPropWithDefaultParamValue(baseViewPropWithDefaultParamValue_Int);
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
object.baseViewProp(baseViewProp_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable
public String sectionId() {
return sectionId_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewProp(int)
*/
public SourceViewModel_ baseViewProp(int baseViewProp) {
onMutation();
this.baseViewProp_Int = baseViewProp;
return this;
}
public int baseViewProp() {
return baseViewProp_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewPropWithDefaultParamValue(int)
*/
public SourceViewModel_ baseViewPropWithDefaultParamValue(int baseViewPropWithDefaultParamValue) {
onMutation();
this.baseViewPropWithDefaultParamValue_Int = baseViewPropWithDefaultParamValue;
return this;
}
public int baseViewPropWithDefaultParamValue() {
return baseViewPropWithDefaultParamValue_Int;
}
public SourceViewModel_ showDividerWithSetter(@Nullable Boolean showDividerWithSetter) {
onMutation();
super.setShowDividerWithSetter(showDividerWithSetter);
return this;
}
@Nullable
public Boolean showDividerWithSetter() {
return super.getShowDividerWithSetter();
}
@Override
public SourceViewModel_ showDividerWithOverriddenMethod(boolean showDivider) {
super.showDividerWithOverriddenMethod(showDivider);
return this;
}
@Override
public SourceViewModel_ showDivider(boolean showDivider) {
super.showDivider(showDivider);
return this;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
this.baseViewProp_Int = 0;
this.baseViewPropWithDefaultParamValue_Int = 0;
super.setShowDivider(null);
super.setShowDividerWithSetter(null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
return false;
}
if ((baseViewPropWithDefaultParamValue_Int != that.baseViewPropWithDefaultParamValue_Int)) {
return false;
}
if ((getShowDivider() != null ? !getShowDivider().equals(that.getShowDivider()) : that.getShowDivider() != null)) {
return false;
}
if ((getShowDividerWithSetter() != null ? !getShowDividerWithSetter().equals(that.getShowDividerWithSetter()) : that.getShowDividerWithSetter() != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + baseViewProp_Int;
_result = 31 * _result + baseViewPropWithDefaultParamValue_Int;
_result = 31 * _result + (getShowDivider() != null ? getShowDivider().hashCode() : 0);
_result = 31 * _result + (getShowDividerWithSetter() != null ? getShowDividerWithSetter().hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", baseViewProp_Int=" + baseViewProp_Int +
", baseViewPropWithDefaultParamValue_Int=" + baseViewPropWithDefaultParamValue_Int +
", showDivider=" + getShowDivider() +
", showDividerWithSetter=" + getShowDividerWithSetter() +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,777 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes/TestManyTypesViewModelBuilder.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.Dimension;
import androidx.annotation.IntRange;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Integer;
import java.lang.Number;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import kotlin.jvm.functions.Function2;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@EpoxyBuildScope
public interface TestManyTypesViewModelBuilder {
TestManyTypesViewModelBuilder onBind(
OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onUnbind(
OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder myProperty(int myProperty);
TestManyTypesViewModelBuilder myNullableProperty(@Nullable("") Integer myNullableProperty);
TestManyTypesViewModelBuilder delegatedProperty(int delegatedProperty);
TestManyTypesViewModelBuilder enabled(boolean enabled);
TestManyTypesViewModelBuilder stringValue(@NotNull("") String stringValue);
TestManyTypesViewModelBuilder functionType(
@NotNull("") Function2<? super String, ? super String, Integer> functionType);
TestManyTypesViewModelBuilder listOfDataClass(@NotNull("") List<SomeDataClass> listOfDataClass);
TestManyTypesViewModelBuilder listOfEnumClass(
@NotNull("") List<? extends SomeEnumClass> listOfEnumClass);
TestManyTypesViewModelBuilder nullableStringValue(@Nullable("") String nullableStringValue);
TestManyTypesViewModelBuilder intValue(int intValue);
TestManyTypesViewModelBuilder intValueWithDefault(int intValueWithDefault);
TestManyTypesViewModelBuilder intValueWithAnnotation(@StringRes int intValueWithAnnotation);
TestManyTypesViewModelBuilder intValueWithRangeAnnotation(
@IntRange(from = 0, to = 200) int intValueWithRangeAnnotation);
TestManyTypesViewModelBuilder intValueWithDimenTypeAnnotation(
@Dimension(unit = 0) int intValueWithDimenTypeAnnotation);
TestManyTypesViewModelBuilder intWithMultipleAnnotations(
@IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations);
TestManyTypesViewModelBuilder integerValue(int integerValue);
TestManyTypesViewModelBuilder boolValue(boolean boolValue);
TestManyTypesViewModelBuilder models(@NotNull("") List<? extends EpoxyModel<?>> models);
TestManyTypesViewModelBuilder booleanValue(@Nullable("") Boolean booleanValue);
TestManyTypesViewModelBuilder arrayValue(@Nullable("") String[] arrayValue);
TestManyTypesViewModelBuilder listValue(@Nullable("") List<String> listValue);
TestManyTypesViewModelBuilder clickListener(
@Nullable("") final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener);
TestManyTypesViewModelBuilder clickListener(@Nullable("") View.OnClickListener clickListener);
TestManyTypesViewModelBuilder customClickListener(
@Nullable("") CustomClickListenerSubclass customClickListener);
TestManyTypesViewModelBuilder title(@androidx.annotation.Nullable CharSequence title);
TestManyTypesViewModelBuilder title(@StringRes int stringRes);
TestManyTypesViewModelBuilder title(@StringRes int stringRes, Object... formatArgs);
TestManyTypesViewModelBuilder titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs);
TestManyTypesViewModelBuilder id(long id);
TestManyTypesViewModelBuilder id(@androidx.annotation.Nullable Number... ids);
TestManyTypesViewModelBuilder id(long id1, long id2);
TestManyTypesViewModelBuilder id(@androidx.annotation.Nullable CharSequence key);
TestManyTypesViewModelBuilder id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys);
TestManyTypesViewModelBuilder id(@androidx.annotation.Nullable CharSequence key, long id);
TestManyTypesViewModelBuilder spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,778 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes/TestManyTypesViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Dimension;
import androidx.annotation.IntRange;
import androidx.annotation.LayoutRes;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Integer;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
import kotlin.jvm.functions.Function2;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Generated file. Do not modify!
*/
public class TestManyTypesViewModel_ extends EpoxyModel<TestManyTypesView> implements GeneratedModel<TestManyTypesView>, TestManyTypesViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(24);
private OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int myProperty_Int = 0;
@Nullable("")
private Integer myNullableProperty_Integer = (Integer) null;
private int delegatedProperty_Int = 0;
private boolean enabled_Boolean = TestManyTypesView.DEFAULT_ENABLED;
/**
* Bitset index: 4
*/
@NotNull("")
private String stringValue_String;
/**
* Bitset index: 5
*/
@NotNull("")
private Function2<? super String, ? super String, Integer> functionType_Function2;
/**
* Bitset index: 6
*/
@NotNull("")
private List<SomeDataClass> listOfDataClass_List;
/**
* Bitset index: 7
*/
@NotNull("")
private List<? extends SomeEnumClass> listOfEnumClass_List;
@Nullable("")
private String nullableStringValue_String = (String) null;
private int intValue_Int = 0;
/**
* Bitset index: 10
*/
private int intValueWithDefault_Int;
@StringRes
private int intValueWithAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
private int intValueWithRangeAnnotation_Int = 0;
@Dimension(
unit = 0
)
private int intValueWithDimenTypeAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
private int intWithMultipleAnnotations_Int = 0;
private int integerValue_Int = 0;
private boolean boolValue_Boolean = false;
/**
* Bitset index: 17
*/
@NotNull("")
private List<? extends EpoxyModel<?>> models_List;
@Nullable("")
private Boolean booleanValue_Boolean = (Boolean) null;
@Nullable("")
private String[] arrayValue_StringArray = (String[]) null;
@Nullable("")
private List<String> listValue_List = (List<String>) null;
@Nullable("")
private View.OnClickListener clickListener_OnClickListener = (View.OnClickListener) null;
@Nullable("")
private CustomClickListenerSubclass customClickListener_CustomClickListenerSubclass = (CustomClickListenerSubclass) null;
private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null);
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(7)) {
throw new IllegalStateException("A value is required for setListOfEnumClass");
}
if (!assignedAttributes_epoxyGeneratedModel.get(4)) {
throw new IllegalStateException("A value is required for setStringValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(5)) {
throw new IllegalStateException("A value is required for setFunctionType");
}
if (!assignedAttributes_epoxyGeneratedModel.get(6)) {
throw new IllegalStateException("A value is required for setListOfDataClass");
}
if (!assignedAttributes_epoxyGeneratedModel.get(17)) {
throw new IllegalStateException("A value is required for setModels");
}
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestManyTypesView buildView(ViewGroup parent) {
TestManyTypesView v = new TestManyTypesView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestManyTypesView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestManyTypesView object) {
super.bind(object);
object.setListOfEnumClass(listOfEnumClass_List);
object.setArrayValue(arrayValue_StringArray);
object.setClickListener(clickListener_OnClickListener);
object.setBooleanValue(booleanValue_Boolean);
object.setMyProperty(myProperty_Int);
object.setCustomClickListener(customClickListener_CustomClickListenerSubclass);
object.setTitle(title_StringAttributeData.toString(object.getContext()));
object.setStringValue(stringValue_String);
object.setNullableStringValue(nullableStringValue_String);
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
object.setEnabled(enabled_Boolean);
object.setFunctionType(functionType_Function2);
object.setIntegerValue(integerValue_Int);
object.setListValue(listValue_List);
object.setIntValue(intValue_Int);
object.setDelegatedProperty(delegatedProperty_Int);
object.setListOfDataClass(listOfDataClass_List);
object.setMyNullableProperty(myNullableProperty_Integer);
if (assignedAttributes_epoxyGeneratedModel.get(10)) {
object.setIntValueWithDefault(intValueWithDefault_Int);
}
else {
object.setIntValueWithDefault();
}
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
object.setBoolValue(boolValue_Boolean);
object.setModels(models_List);
}
@Override
public void bind(final TestManyTypesView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestManyTypesViewModel_)) {
bind(object);
return;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) previousModel;
super.bind(object);
if ((listOfEnumClass_List != null ? !listOfEnumClass_List.equals(that.listOfEnumClass_List) : that.listOfEnumClass_List != null)) {
object.setListOfEnumClass(listOfEnumClass_List);
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
object.setArrayValue(arrayValue_StringArray);
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
object.setClickListener(clickListener_OnClickListener);
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
object.setBooleanValue(booleanValue_Boolean);
}
if ((myProperty_Int != that.myProperty_Int)) {
object.setMyProperty(myProperty_Int);
}
if (((customClickListener_CustomClickListenerSubclass == null) != (that.customClickListener_CustomClickListenerSubclass == null))) {
object.setCustomClickListener(customClickListener_CustomClickListenerSubclass);
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
object.setStringValue(stringValue_String);
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
object.setNullableStringValue(nullableStringValue_String);
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
}
if ((enabled_Boolean != that.enabled_Boolean)) {
object.setEnabled(enabled_Boolean);
}
if (((functionType_Function2 == null) != (that.functionType_Function2 == null))) {
object.setFunctionType(functionType_Function2);
}
if ((integerValue_Int != that.integerValue_Int)) {
object.setIntegerValue(integerValue_Int);
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
object.setListValue(listValue_List);
}
if ((intValue_Int != that.intValue_Int)) {
object.setIntValue(intValue_Int);
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
object.setDelegatedProperty(delegatedProperty_Int);
}
if ((listOfDataClass_List != null ? !listOfDataClass_List.equals(that.listOfDataClass_List) : that.listOfDataClass_List != null)) {
object.setListOfDataClass(listOfDataClass_List);
}
if ((myNullableProperty_Integer != null ? !myNullableProperty_Integer.equals(that.myNullableProperty_Integer) : that.myNullableProperty_Integer != null)) {
object.setMyNullableProperty(myNullableProperty_Integer);
}
if (assignedAttributes_epoxyGeneratedModel.get(10)) {
if ((intValueWithDefault_Int != that.intValueWithDefault_Int)) {
object.setIntValueWithDefault(intValueWithDefault_Int);
}
}
// A value was not set so we should use the default value, but we only need to set it if the previous model had a custom value set.
else if (that.assignedAttributes_epoxyGeneratedModel.get(10)) {
object.setIntValueWithDefault();
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
object.setBoolValue(boolValue_Boolean);
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
object.setModels(models_List);
}
}
@Override
public void handlePostBind(final TestManyTypesView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onBind(
OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestManyTypesView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onUnbind(
OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestManyTypesView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestManyTypesView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setMyProperty(int)
*/
public TestManyTypesViewModel_ myProperty(int myProperty) {
onMutation();
this.myProperty_Int = myProperty;
return this;
}
public int myProperty() {
return myProperty_Int;
}
/**
* <i>Optional</i>: Default value is (Integer) null
*
* @see TestManyTypesView#setMyNullableProperty(Integer)
*/
public TestManyTypesViewModel_ myNullableProperty(@Nullable("") Integer myNullableProperty) {
onMutation();
this.myNullableProperty_Integer = myNullableProperty;
return this;
}
@Nullable("")
public Integer myNullableProperty() {
return myNullableProperty_Integer;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setDelegatedProperty(int)
*/
public TestManyTypesViewModel_ delegatedProperty(int delegatedProperty) {
onMutation();
this.delegatedProperty_Int = delegatedProperty;
return this;
}
public int delegatedProperty() {
return delegatedProperty_Int;
}
/**
* <i>Optional</i>: Default value is <b>{@value TestManyTypesView#DEFAULT_ENABLED}</b>
*
* @see TestManyTypesView#setEnabled(boolean)
*/
public TestManyTypesViewModel_ enabled(boolean enabled) {
onMutation();
this.enabled_Boolean = enabled;
return this;
}
public boolean enabled() {
return enabled_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setStringValue(String)
*/
public TestManyTypesViewModel_ stringValue(@NotNull("") String stringValue) {
if (stringValue == null) {
throw new IllegalArgumentException("stringValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(4);
onMutation();
this.stringValue_String = stringValue;
return this;
}
@NotNull("")
public String stringValue() {
return stringValue_String;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setFunctionType(Function2<? super String, ? super String, Integer>)
*/
public TestManyTypesViewModel_ functionType(
@NotNull("") Function2<? super String, ? super String, Integer> functionType) {
if (functionType == null) {
throw new IllegalArgumentException("functionType cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(5);
onMutation();
this.functionType_Function2 = functionType;
return this;
}
@NotNull("")
public Function2<? super String, ? super String, Integer> functionType() {
return functionType_Function2;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setListOfDataClass(List<SomeDataClass>)
*/
public TestManyTypesViewModel_ listOfDataClass(@NotNull("") List<SomeDataClass> listOfDataClass) {
if (listOfDataClass == null) {
throw new IllegalArgumentException("listOfDataClass cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(6);
onMutation();
this.listOfDataClass_List = listOfDataClass;
return this;
}
@NotNull("")
public List<SomeDataClass> listOfDataClass() {
return listOfDataClass_List;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setListOfEnumClass(List<? extends SomeEnumClass>)
*/
public TestManyTypesViewModel_ listOfEnumClass(
@NotNull("") List<? extends SomeEnumClass> listOfEnumClass) {
if (listOfEnumClass == null) {
throw new IllegalArgumentException("listOfEnumClass cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(7);
onMutation();
this.listOfEnumClass_List = listOfEnumClass;
return this;
}
@NotNull("")
public List<? extends SomeEnumClass> listOfEnumClass() {
return listOfEnumClass_List;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see TestManyTypesView#setNullableStringValue(String)
*/
public TestManyTypesViewModel_ nullableStringValue(@Nullable("") String nullableStringValue) {
onMutation();
this.nullableStringValue_String = nullableStringValue;
return this;
}
@Nullable("")
public String nullableStringValue() {
return nullableStringValue_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValue(int)
*/
public TestManyTypesViewModel_ intValue(int intValue) {
onMutation();
this.intValue_Int = intValue;
return this;
}
public int intValue() {
return intValue_Int;
}
/**
* <i>Optional</i>: View function has a Kotlin default argument
*
* @see TestManyTypesView#setIntValueWithDefault(int)
*/
public TestManyTypesViewModel_ intValueWithDefault(int intValueWithDefault) {
assignedAttributes_epoxyGeneratedModel.set(10);
onMutation();
this.intValueWithDefault_Int = intValueWithDefault;
return this;
}
public int intValueWithDefault() {
return intValueWithDefault_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithAnnotation(@StringRes int intValueWithAnnotation) {
onMutation();
this.intValueWithAnnotation_Int = intValueWithAnnotation;
return this;
}
@StringRes
public int intValueWithAnnotation() {
return intValueWithAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithRangeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithRangeAnnotation(
@IntRange(from = 0, to = 200) int intValueWithRangeAnnotation) {
onMutation();
this.intValueWithRangeAnnotation_Int = intValueWithRangeAnnotation;
return this;
}
@IntRange(
from = 0,
to = 200
)
public int intValueWithRangeAnnotation() {
return intValueWithRangeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithDimenTypeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithDimenTypeAnnotation(
@Dimension(unit = 0) int intValueWithDimenTypeAnnotation) {
onMutation();
this.intValueWithDimenTypeAnnotation_Int = intValueWithDimenTypeAnnotation;
return this;
}
@Dimension(
unit = 0
)
public int intValueWithDimenTypeAnnotation() {
return intValueWithDimenTypeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntWithMultipleAnnotations(int)
*/
public TestManyTypesViewModel_ intWithMultipleAnnotations(
@IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations) {
onMutation();
this.intWithMultipleAnnotations_Int = intWithMultipleAnnotations;
return this;
}
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
public int intWithMultipleAnnotations() {
return intWithMultipleAnnotations_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntegerValue(int)
*/
public TestManyTypesViewModel_ integerValue(int integerValue) {
onMutation();
this.integerValue_Int = integerValue;
return this;
}
public int integerValue() {
return integerValue_Int;
}
/**
* <i>Optional</i>: Default value is false
*
* @see TestManyTypesView#setBoolValue(boolean)
*/
public TestManyTypesViewModel_ boolValue(boolean boolValue) {
onMutation();
this.boolValue_Boolean = boolValue;
return this;
}
public boolean boolValue() {
return boolValue_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setModels(List<? extends EpoxyModel<?>>)
*/
public TestManyTypesViewModel_ models(@NotNull("") List<? extends EpoxyModel<?>> models) {
if (models == null) {
throw new IllegalArgumentException("models cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(17);
onMutation();
this.models_List = models;
return this;
}
@NotNull("")
public List<? extends EpoxyModel<?>> models() {
return models_List;
}
/**
* <i>Optional</i>: Default value is (Boolean) null
*
* @see TestManyTypesView#setBooleanValue(Boolean)
*/
public TestManyTypesViewModel_ booleanValue(@Nullable("") Boolean booleanValue) {
onMutation();
this.booleanValue_Boolean = booleanValue;
return this;
}
@Nullable("")
public Boolean booleanValue() {
return booleanValue_Boolean;
}
/**
* <i>Optional</i>: Default value is (String[]) null
*
* @see TestManyTypesView#setArrayValue(String[])
*/
public TestManyTypesViewModel_ arrayValue(@Nullable("") String[] arrayValue) {
onMutation();
this.arrayValue_StringArray = arrayValue;
return this;
}
@Nullable("")
public String[] arrayValue() {
return arrayValue_StringArray;
}
/**
* <i>Optional</i>: Default value is (List<String>) null
*
* @see TestManyTypesView#setListValue(List<String>)
*/
public TestManyTypesViewModel_ listValue(@Nullable("") List<String> listValue) {
onMutation();
this.listValue_List = listValue;
return this;
}
@Nullable("")
public List<String> listValue() {
return listValue_List;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestManyTypesViewModel_ clickListener(
@Nullable("") final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener) {
onMutation();
if (clickListener == null) {
this.clickListener_OnClickListener = null;
}
else {
this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener);
}
return this;
}
/**
* <i>Optional</i>: Default value is (View.OnClickListener) null
*
* @see TestManyTypesView#setClickListener(View.OnClickListener)
*/
public TestManyTypesViewModel_ clickListener(@Nullable("") View.OnClickListener clickListener) {
onMutation();
this.clickListener_OnClickListener = clickListener;
return this;
}
@Nullable("")
public View.OnClickListener clickListener() {
return clickListener_OnClickListener;
}
/**
* <i>Optional</i>: Default value is (CustomClickListenerSubclass) null
*
* @see TestManyTypesView#setCustomClickListener(CustomClickListenerSubclass)
*/
public TestManyTypesViewModel_ customClickListener(
@Nullable("") CustomClickListenerSubclass customClickListener) {
onMutation();
this.customClickListener_CustomClickListenerSubclass = customClickListener;
return this;
}
@Nullable("")
public CustomClickListenerSubclass customClickListener() {
return customClickListener_CustomClickListenerSubclass;
}
@androidx.annotation.Nullable
public CharSequence getTitle(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@androidx.annotation.Nullable CharSequence title) {
onMutation();
title_StringAttributeData.setValue(title);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes) {
onMutation();
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
@Override
public TestManyTypesViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public TestManyTypesViewModel_ id(@androidx.annotation.Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public TestManyTypesViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public TestManyTypesViewModel_ id(@androidx.annotation.Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public TestManyTypesViewModel_ id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public TestManyTypesViewModel_ id(@androidx.annotation.Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public TestManyTypesViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestManyTypesViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public TestManyTypesViewModel_ show() {
super.show();
return this;
}
@Override
public TestManyTypesViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public TestManyTypesViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestManyTypesViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.myProperty_Int = 0;
this.myNullableProperty_Integer = (Integer) null;
this.delegatedProperty_Int = 0;
this.enabled_Boolean = TestManyTypesView.DEFAULT_ENABLED;
this.stringValue_String = null;
this.functionType_Function2 = null;
this.listOfDataClass_List = null;
this.listOfEnumClass_List = null;
this.nullableStringValue_String = (String) null;
this.intValue_Int = 0;
this.intValueWithDefault_Int = 0;
this.intValueWithAnnotation_Int = 0;
this.intValueWithRangeAnnotation_Int = 0;
this.intValueWithDimenTypeAnnotation_Int = 0;
this.intWithMultipleAnnotations_Int = 0;
this.integerValue_Int = 0;
this.boolValue_Boolean = false;
this.models_List = null;
this.booleanValue_Boolean = (Boolean) null;
this.arrayValue_StringArray = (String[]) null;
this.listValue_List = (List<String>) null;
this.clickListener_OnClickListener = (View.OnClickListener) null;
this.customClickListener_CustomClickListenerSubclass = (CustomClickListenerSubclass) null;
this.title_StringAttributeData = new StringAttributeData((CharSequence) null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestManyTypesViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) 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 ((myProperty_Int != that.myProperty_Int)) {
return false;
}
if ((myNullableProperty_Integer != null ? !myNullableProperty_Integer.equals(that.myNullableProperty_Integer) : that.myNullableProperty_Integer != null)) {
return false;
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
return false;
}
if ((enabled_Boolean != that.enabled_Boolean)) {
return false;
}
if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
return false;
}
if (((functionType_Function2 == null) != (that.functionType_Function2 == null))) {
return false;
}
if ((listOfDataClass_List != null ? !listOfDataClass_List.equals(that.listOfDataClass_List) : that.listOfDataClass_List != null)) {
return false;
}
if ((listOfEnumClass_List != null ? !listOfEnumClass_List.equals(that.listOfEnumClass_List) : that.listOfEnumClass_List != null)) {
return false;
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
return false;
}
if ((intValue_Int != that.intValue_Int)) {
return false;
}
if ((intValueWithDefault_Int != that.intValueWithDefault_Int)) {
return false;
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
return false;
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
return false;
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
return false;
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
return false;
}
if ((integerValue_Int != that.integerValue_Int)) {
return false;
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
return false;
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
return false;
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
return false;
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
return false;
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
return false;
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
return false;
}
if (((customClickListener_CustomClickListenerSubclass == null) != (that.customClickListener_CustomClickListenerSubclass == null))) {
return false;
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + myProperty_Int;
_result = 31 * _result + (myNullableProperty_Integer != null ? myNullableProperty_Integer.hashCode() : 0);
_result = 31 * _result + delegatedProperty_Int;
_result = 31 * _result + (enabled_Boolean ? 1 : 0);
_result = 31 * _result + (stringValue_String != null ? stringValue_String.hashCode() : 0);
_result = 31 * _result + (functionType_Function2 != null ? 1 : 0);
_result = 31 * _result + (listOfDataClass_List != null ? listOfDataClass_List.hashCode() : 0);
_result = 31 * _result + (listOfEnumClass_List != null ? listOfEnumClass_List.hashCode() : 0);
_result = 31 * _result + (nullableStringValue_String != null ? nullableStringValue_String.hashCode() : 0);
_result = 31 * _result + intValue_Int;
_result = 31 * _result + intValueWithDefault_Int;
_result = 31 * _result + intValueWithAnnotation_Int;
_result = 31 * _result + intValueWithRangeAnnotation_Int;
_result = 31 * _result + intValueWithDimenTypeAnnotation_Int;
_result = 31 * _result + intWithMultipleAnnotations_Int;
_result = 31 * _result + integerValue_Int;
_result = 31 * _result + (boolValue_Boolean ? 1 : 0);
_result = 31 * _result + (models_List != null ? models_List.hashCode() : 0);
_result = 31 * _result + (booleanValue_Boolean != null ? booleanValue_Boolean.hashCode() : 0);
_result = 31 * _result + Arrays.hashCode(arrayValue_StringArray);
_result = 31 * _result + (listValue_List != null ? listValue_List.hashCode() : 0);
_result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0);
_result = 31 * _result + (customClickListener_CustomClickListenerSubclass != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "TestManyTypesViewModel_{" +
"myProperty_Int=" + myProperty_Int +
", myNullableProperty_Integer=" + myNullableProperty_Integer +
", delegatedProperty_Int=" + delegatedProperty_Int +
", enabled_Boolean=" + enabled_Boolean +
", stringValue_String=" + stringValue_String +
", listOfDataClass_List=" + listOfDataClass_List +
", listOfEnumClass_List=" + listOfEnumClass_List +
", nullableStringValue_String=" + nullableStringValue_String +
", intValue_Int=" + intValue_Int +
", intValueWithDefault_Int=" + intValueWithDefault_Int +
", intValueWithAnnotation_Int=" + intValueWithAnnotation_Int +
", intValueWithRangeAnnotation_Int=" + intValueWithRangeAnnotation_Int +
", intValueWithDimenTypeAnnotation_Int=" + intValueWithDimenTypeAnnotation_Int +
", intWithMultipleAnnotations_Int=" + intWithMultipleAnnotations_Int +
", integerValue_Int=" + integerValue_Int +
", boolValue_Boolean=" + boolValue_Boolean +
", models_List=" + models_List +
", booleanValue_Boolean=" + booleanValue_Boolean +
", arrayValue_StringArray=" + arrayValue_StringArray +
", listValue_List=" + listValue_List +
", clickListener_OnClickListener=" + clickListener_OnClickListener +
", customClickListener_CustomClickListenerSubclass=" + customClickListener_CustomClickListenerSubclass +
", title_StringAttributeData=" + title_StringAttributeData +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,779 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes/ksp/TestManyTypesViewModelBuilder.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.Dimension;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Integer;
import java.lang.Number;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import kotlin.jvm.functions.Function2;
@EpoxyBuildScope
public interface TestManyTypesViewModelBuilder {
TestManyTypesViewModelBuilder onBind(
OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onUnbind(
OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener);
TestManyTypesViewModelBuilder enabled(boolean enabled);
TestManyTypesViewModelBuilder stringValue(@NonNull String stringValue);
TestManyTypesViewModelBuilder functionType(
@NonNull Function2<? super String, ? super String, Integer> functionType);
TestManyTypesViewModelBuilder listOfDataClass(@NonNull List<SomeDataClass> listOfDataClass);
TestManyTypesViewModelBuilder listOfEnumClass(@NonNull List<SomeEnumClass> listOfEnumClass);
TestManyTypesViewModelBuilder nullableStringValue(@Nullable String nullableStringValue);
TestManyTypesViewModelBuilder intValue(int intValue);
TestManyTypesViewModelBuilder intValueWithDefault(int intValueWithDefault);
TestManyTypesViewModelBuilder intValueWithAnnotation(@StringRes int intValueWithAnnotation);
TestManyTypesViewModelBuilder intValueWithRangeAnnotation(
@IntRange(from = 0, to = 200) int intValueWithRangeAnnotation);
TestManyTypesViewModelBuilder intValueWithDimenTypeAnnotation(
@Dimension(unit = 0) int intValueWithDimenTypeAnnotation);
TestManyTypesViewModelBuilder intWithMultipleAnnotations(
@IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations);
TestManyTypesViewModelBuilder integerValue(int integerValue);
TestManyTypesViewModelBuilder boolValue(boolean boolValue);
TestManyTypesViewModelBuilder models(@NonNull List<? extends EpoxyModel<?>> models);
TestManyTypesViewModelBuilder booleanValue(@Nullable Boolean booleanValue);
TestManyTypesViewModelBuilder arrayValue(@Nullable String[] arrayValue);
TestManyTypesViewModelBuilder listValue(@Nullable List<String> listValue);
TestManyTypesViewModelBuilder clickListener(
@Nullable final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener);
TestManyTypesViewModelBuilder clickListener(@Nullable View.OnClickListener clickListener);
TestManyTypesViewModelBuilder customClickListener(
@Nullable CustomClickListenerSubclass customClickListener);
TestManyTypesViewModelBuilder title(@Nullable CharSequence title);
TestManyTypesViewModelBuilder title(@StringRes int stringRes);
TestManyTypesViewModelBuilder title(@StringRes int stringRes, Object... formatArgs);
TestManyTypesViewModelBuilder titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs);
TestManyTypesViewModelBuilder myProperty(int myProperty);
TestManyTypesViewModelBuilder myNullableProperty(@Nullable Integer myNullableProperty);
TestManyTypesViewModelBuilder delegatedProperty(int delegatedProperty);
TestManyTypesViewModelBuilder id(long p0);
TestManyTypesViewModelBuilder id(@Nullable Number... p0);
TestManyTypesViewModelBuilder id(long p0, long p1);
TestManyTypesViewModelBuilder id(@Nullable CharSequence p0);
TestManyTypesViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
TestManyTypesViewModelBuilder id(@Nullable CharSequence p0, long p1);
TestManyTypesViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,780 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testManyTypes/ksp/TestManyTypesViewModel_.java | package com.airbnb.epoxy;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Dimension;
import androidx.annotation.IntRange;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Integer;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
import kotlin.jvm.functions.Function2;
/**
* Generated file. Do not modify!
*/
public class TestManyTypesViewModel_ extends EpoxyModel<TestManyTypesView> implements GeneratedModel<TestManyTypesView>, TestManyTypesViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(24);
private OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityChangedListener_epoxyGeneratedModel;
private boolean enabled_Boolean = TestManyTypesView.DEFAULT_ENABLED;
/**
* Bitset index: 1
*/
@NonNull
private String stringValue_String;
/**
* Bitset index: 2
*/
@NonNull
private Function2<? super String, ? super String, Integer> functionType_Function2;
/**
* Bitset index: 3
*/
@NonNull
private List<SomeDataClass> listOfDataClass_List;
/**
* Bitset index: 4
*/
@NonNull
private List<SomeEnumClass> listOfEnumClass_List;
@Nullable
private String nullableStringValue_String = (String) null;
private int intValue_Int = 0;
/**
* Bitset index: 7
*/
private int intValueWithDefault_Int;
@StringRes
private int intValueWithAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
private int intValueWithRangeAnnotation_Int = 0;
@Dimension(
unit = 0
)
private int intValueWithDimenTypeAnnotation_Int = 0;
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
private int intWithMultipleAnnotations_Int = 0;
private int integerValue_Int = 0;
private boolean boolValue_Boolean = false;
/**
* Bitset index: 14
*/
@NonNull
private List<? extends EpoxyModel<?>> models_List;
@Nullable
private Boolean booleanValue_Boolean = (Boolean) null;
@Nullable
private String[] arrayValue_StringArray = (String[]) null;
@Nullable
private List<String> listValue_List = (List<String>) null;
@Nullable
private View.OnClickListener clickListener_OnClickListener = (View.OnClickListener) null;
@Nullable
private CustomClickListenerSubclass customClickListener_CustomClickListenerSubclass = (CustomClickListenerSubclass) null;
private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null);
private int myProperty_Int = 0;
@Nullable
private Integer myNullableProperty_Integer = (Integer) null;
private int delegatedProperty_Int = 0;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(4)) {
throw new IllegalStateException("A value is required for setListOfEnumClass");
}
if (!assignedAttributes_epoxyGeneratedModel.get(1)) {
throw new IllegalStateException("A value is required for setStringValue");
}
if (!assignedAttributes_epoxyGeneratedModel.get(2)) {
throw new IllegalStateException("A value is required for setFunctionType");
}
if (!assignedAttributes_epoxyGeneratedModel.get(3)) {
throw new IllegalStateException("A value is required for setListOfDataClass");
}
if (!assignedAttributes_epoxyGeneratedModel.get(14)) {
throw new IllegalStateException("A value is required for setModels");
}
}
@Override
protected int getViewType() {
return 0;
}
@Override
public TestManyTypesView buildView(ViewGroup parent) {
TestManyTypesView v = new TestManyTypesView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final TestManyTypesView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final TestManyTypesView object) {
super.bind(object);
object.setListOfEnumClass(listOfEnumClass_List);
object.setArrayValue(arrayValue_StringArray);
object.setClickListener(clickListener_OnClickListener);
object.setBooleanValue(booleanValue_Boolean);
object.setCustomClickListener(customClickListener_CustomClickListenerSubclass);
object.setTitle(title_StringAttributeData.toString(object.getContext()));
object.setMyProperty(myProperty_Int);
object.setStringValue(stringValue_String);
object.setNullableStringValue(nullableStringValue_String);
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
object.setEnabled(enabled_Boolean);
object.setFunctionType(functionType_Function2);
object.setIntegerValue(integerValue_Int);
object.setListValue(listValue_List);
object.setIntValue(intValue_Int);
object.setListOfDataClass(listOfDataClass_List);
object.setDelegatedProperty(delegatedProperty_Int);
if (assignedAttributes_epoxyGeneratedModel.get(7)) {
object.setIntValueWithDefault(intValueWithDefault_Int);
}
else {
object.setIntValueWithDefault();
}
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
object.setBoolValue(boolValue_Boolean);
object.setModels(models_List);
object.setMyNullableProperty(myNullableProperty_Integer);
}
@Override
public void bind(final TestManyTypesView object, EpoxyModel previousModel) {
if (!(previousModel instanceof TestManyTypesViewModel_)) {
bind(object);
return;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) previousModel;
super.bind(object);
if ((listOfEnumClass_List != null ? !listOfEnumClass_List.equals(that.listOfEnumClass_List) : that.listOfEnumClass_List != null)) {
object.setListOfEnumClass(listOfEnumClass_List);
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
object.setArrayValue(arrayValue_StringArray);
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
object.setClickListener(clickListener_OnClickListener);
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
object.setBooleanValue(booleanValue_Boolean);
}
if (((customClickListener_CustomClickListenerSubclass == null) != (that.customClickListener_CustomClickListenerSubclass == null))) {
object.setCustomClickListener(customClickListener_CustomClickListenerSubclass);
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
object.setTitle(title_StringAttributeData.toString(object.getContext()));
}
if ((myProperty_Int != that.myProperty_Int)) {
object.setMyProperty(myProperty_Int);
}
if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
object.setStringValue(stringValue_String);
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
object.setNullableStringValue(nullableStringValue_String);
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
object.setIntValueWithAnnotation(intValueWithAnnotation_Int);
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int);
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int);
}
if ((enabled_Boolean != that.enabled_Boolean)) {
object.setEnabled(enabled_Boolean);
}
if (((functionType_Function2 == null) != (that.functionType_Function2 == null))) {
object.setFunctionType(functionType_Function2);
}
if ((integerValue_Int != that.integerValue_Int)) {
object.setIntegerValue(integerValue_Int);
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
object.setListValue(listValue_List);
}
if ((intValue_Int != that.intValue_Int)) {
object.setIntValue(intValue_Int);
}
if ((listOfDataClass_List != null ? !listOfDataClass_List.equals(that.listOfDataClass_List) : that.listOfDataClass_List != null)) {
object.setListOfDataClass(listOfDataClass_List);
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
object.setDelegatedProperty(delegatedProperty_Int);
}
if (assignedAttributes_epoxyGeneratedModel.get(7)) {
if ((intValueWithDefault_Int != that.intValueWithDefault_Int)) {
object.setIntValueWithDefault(intValueWithDefault_Int);
}
}
// A value was not set so we should use the default value, but we only need to set it if the previous model had a custom value set.
else if (that.assignedAttributes_epoxyGeneratedModel.get(7)) {
object.setIntValueWithDefault();
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int);
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
object.setBoolValue(boolValue_Boolean);
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
object.setModels(models_List);
}
if ((myNullableProperty_Integer != null ? !myNullableProperty_Integer.equals(that.myNullableProperty_Integer) : that.myNullableProperty_Integer != null)) {
object.setMyNullableProperty(myNullableProperty_Integer);
}
}
@Override
public void handlePostBind(final TestManyTypesView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onBind(
OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(TestManyTypesView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public TestManyTypesViewModel_ onUnbind(
OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final TestManyTypesView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final TestManyTypesView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public TestManyTypesViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is <b>{@value TestManyTypesView#DEFAULT_ENABLED}</b>
*
* @see TestManyTypesView#setEnabled(boolean)
*/
public TestManyTypesViewModel_ enabled(boolean enabled) {
onMutation();
this.enabled_Boolean = enabled;
return this;
}
public boolean enabled() {
return enabled_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setStringValue(String)
*/
public TestManyTypesViewModel_ stringValue(@NonNull String stringValue) {
if (stringValue == null) {
throw new IllegalArgumentException("stringValue cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(1);
onMutation();
this.stringValue_String = stringValue;
return this;
}
@NonNull
public String stringValue() {
return stringValue_String;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setFunctionType(Function2<? super String, ? super String, Integer>)
*/
public TestManyTypesViewModel_ functionType(
@NonNull Function2<? super String, ? super String, Integer> functionType) {
if (functionType == null) {
throw new IllegalArgumentException("functionType cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(2);
onMutation();
this.functionType_Function2 = functionType;
return this;
}
@NonNull
public Function2<? super String, ? super String, Integer> functionType() {
return functionType_Function2;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setListOfDataClass(List<SomeDataClass>)
*/
public TestManyTypesViewModel_ listOfDataClass(@NonNull List<SomeDataClass> listOfDataClass) {
if (listOfDataClass == null) {
throw new IllegalArgumentException("listOfDataClass cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(3);
onMutation();
this.listOfDataClass_List = listOfDataClass;
return this;
}
@NonNull
public List<SomeDataClass> listOfDataClass() {
return listOfDataClass_List;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setListOfEnumClass(List<SomeEnumClass>)
*/
public TestManyTypesViewModel_ listOfEnumClass(@NonNull List<SomeEnumClass> listOfEnumClass) {
if (listOfEnumClass == null) {
throw new IllegalArgumentException("listOfEnumClass cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(4);
onMutation();
this.listOfEnumClass_List = listOfEnumClass;
return this;
}
@NonNull
public List<SomeEnumClass> listOfEnumClass() {
return listOfEnumClass_List;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see TestManyTypesView#setNullableStringValue(String)
*/
public TestManyTypesViewModel_ nullableStringValue(@Nullable String nullableStringValue) {
onMutation();
this.nullableStringValue_String = nullableStringValue;
return this;
}
@Nullable
public String nullableStringValue() {
return nullableStringValue_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValue(int)
*/
public TestManyTypesViewModel_ intValue(int intValue) {
onMutation();
this.intValue_Int = intValue;
return this;
}
public int intValue() {
return intValue_Int;
}
/**
* <i>Optional</i>: View function has a Kotlin default argument
*
* @see TestManyTypesView#setIntValueWithDefault(int)
*/
public TestManyTypesViewModel_ intValueWithDefault(int intValueWithDefault) {
assignedAttributes_epoxyGeneratedModel.set(7);
onMutation();
this.intValueWithDefault_Int = intValueWithDefault;
return this;
}
public int intValueWithDefault() {
return intValueWithDefault_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithAnnotation(@StringRes int intValueWithAnnotation) {
onMutation();
this.intValueWithAnnotation_Int = intValueWithAnnotation;
return this;
}
@StringRes
public int intValueWithAnnotation() {
return intValueWithAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithRangeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithRangeAnnotation(
@IntRange(from = 0, to = 200) int intValueWithRangeAnnotation) {
onMutation();
this.intValueWithRangeAnnotation_Int = intValueWithRangeAnnotation;
return this;
}
@IntRange(
from = 0,
to = 200
)
public int intValueWithRangeAnnotation() {
return intValueWithRangeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntValueWithDimenTypeAnnotation(int)
*/
public TestManyTypesViewModel_ intValueWithDimenTypeAnnotation(
@Dimension(unit = 0) int intValueWithDimenTypeAnnotation) {
onMutation();
this.intValueWithDimenTypeAnnotation_Int = intValueWithDimenTypeAnnotation;
return this;
}
@Dimension(
unit = 0
)
public int intValueWithDimenTypeAnnotation() {
return intValueWithDimenTypeAnnotation_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntWithMultipleAnnotations(int)
*/
public TestManyTypesViewModel_ intWithMultipleAnnotations(
@IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations) {
onMutation();
this.intWithMultipleAnnotations_Int = intWithMultipleAnnotations;
return this;
}
@IntRange(
from = 0,
to = 200
)
@Dimension(
unit = 0
)
public int intWithMultipleAnnotations() {
return intWithMultipleAnnotations_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setIntegerValue(int)
*/
public TestManyTypesViewModel_ integerValue(int integerValue) {
onMutation();
this.integerValue_Int = integerValue;
return this;
}
public int integerValue() {
return integerValue_Int;
}
/**
* <i>Optional</i>: Default value is false
*
* @see TestManyTypesView#setBoolValue(boolean)
*/
public TestManyTypesViewModel_ boolValue(boolean boolValue) {
onMutation();
this.boolValue_Boolean = boolValue;
return this;
}
public boolean boolValue() {
return boolValue_Boolean;
}
/**
* <i>Required.</i>
*
* @see TestManyTypesView#setModels(List<? extends EpoxyModel<?>>)
*/
public TestManyTypesViewModel_ models(@NonNull List<? extends EpoxyModel<?>> models) {
if (models == null) {
throw new IllegalArgumentException("models cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(14);
onMutation();
this.models_List = models;
return this;
}
@NonNull
public List<? extends EpoxyModel<?>> models() {
return models_List;
}
/**
* <i>Optional</i>: Default value is (Boolean) null
*
* @see TestManyTypesView#setBooleanValue(Boolean)
*/
public TestManyTypesViewModel_ booleanValue(@Nullable Boolean booleanValue) {
onMutation();
this.booleanValue_Boolean = booleanValue;
return this;
}
@Nullable
public Boolean booleanValue() {
return booleanValue_Boolean;
}
/**
* <i>Optional</i>: Default value is (String[]) null
*
* @see TestManyTypesView#setArrayValue(String[])
*/
public TestManyTypesViewModel_ arrayValue(@Nullable String[] arrayValue) {
onMutation();
this.arrayValue_StringArray = arrayValue;
return this;
}
@Nullable
public String[] arrayValue() {
return arrayValue_StringArray;
}
/**
* <i>Optional</i>: Default value is (List<String>) null
*
* @see TestManyTypesView#setListValue(List<String>)
*/
public TestManyTypesViewModel_ listValue(@Nullable List<String> listValue) {
onMutation();
this.listValue_List = listValue;
return this;
}
@Nullable
public List<String> listValue() {
return listValue_List;
}
/**
* Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set
*/
public TestManyTypesViewModel_ clickListener(
@Nullable final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener) {
onMutation();
if (clickListener == null) {
this.clickListener_OnClickListener = null;
}
else {
this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener);
}
return this;
}
/**
* <i>Optional</i>: Default value is (View.OnClickListener) null
*
* @see TestManyTypesView#setClickListener(View.OnClickListener)
*/
public TestManyTypesViewModel_ clickListener(@Nullable View.OnClickListener clickListener) {
onMutation();
this.clickListener_OnClickListener = clickListener;
return this;
}
@Nullable
public View.OnClickListener clickListener() {
return clickListener_OnClickListener;
}
/**
* <i>Optional</i>: Default value is (CustomClickListenerSubclass) null
*
* @see TestManyTypesView#setCustomClickListener(CustomClickListenerSubclass)
*/
public TestManyTypesViewModel_ customClickListener(
@Nullable CustomClickListenerSubclass customClickListener) {
onMutation();
this.customClickListener_CustomClickListenerSubclass = customClickListener;
return this;
}
@Nullable
public CustomClickListenerSubclass customClickListener() {
return customClickListener_CustomClickListenerSubclass;
}
@Nullable
public CharSequence getTitle(Context context) {
return title_StringAttributeData.toString(context);
}
/**
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@Nullable CharSequence title) {
onMutation();
title_StringAttributeData.setValue(title);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes) {
onMutation();
title_StringAttributeData.setValue(stringRes);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ title(@StringRes int stringRes, Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(stringRes, formatArgs);
return this;
}
/**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is (CharSequence) null
*
* @see TestManyTypesView#setTitle(CharSequence)
*/
public TestManyTypesViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity,
Object... formatArgs) {
onMutation();
title_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setMyProperty(int)
*/
public TestManyTypesViewModel_ myProperty(int myProperty) {
onMutation();
this.myProperty_Int = myProperty;
return this;
}
public int myProperty() {
return myProperty_Int;
}
/**
* <i>Optional</i>: Default value is (Integer) null
*
* @see TestManyTypesView#setMyNullableProperty(Integer)
*/
public TestManyTypesViewModel_ myNullableProperty(@Nullable Integer myNullableProperty) {
onMutation();
this.myNullableProperty_Integer = myNullableProperty;
return this;
}
@Nullable
public Integer myNullableProperty() {
return myNullableProperty_Integer;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see TestManyTypesView#setDelegatedProperty(int)
*/
public TestManyTypesViewModel_ delegatedProperty(int delegatedProperty) {
onMutation();
this.delegatedProperty_Int = delegatedProperty;
return this;
}
public int delegatedProperty() {
return delegatedProperty_Int;
}
@Override
public TestManyTypesViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public TestManyTypesViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public TestManyTypesViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public TestManyTypesViewModel_ show() {
super.show();
return this;
}
@Override
public TestManyTypesViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public TestManyTypesViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public TestManyTypesViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.enabled_Boolean = TestManyTypesView.DEFAULT_ENABLED;
this.stringValue_String = null;
this.functionType_Function2 = null;
this.listOfDataClass_List = null;
this.listOfEnumClass_List = null;
this.nullableStringValue_String = (String) null;
this.intValue_Int = 0;
this.intValueWithDefault_Int = 0;
this.intValueWithAnnotation_Int = 0;
this.intValueWithRangeAnnotation_Int = 0;
this.intValueWithDimenTypeAnnotation_Int = 0;
this.intWithMultipleAnnotations_Int = 0;
this.integerValue_Int = 0;
this.boolValue_Boolean = false;
this.models_List = null;
this.booleanValue_Boolean = (Boolean) null;
this.arrayValue_StringArray = (String[]) null;
this.listValue_List = (List<String>) null;
this.clickListener_OnClickListener = (View.OnClickListener) null;
this.customClickListener_CustomClickListenerSubclass = (CustomClickListenerSubclass) null;
this.title_StringAttributeData = new StringAttributeData((CharSequence) null);
this.myProperty_Int = 0;
this.myNullableProperty_Integer = (Integer) null;
this.delegatedProperty_Int = 0;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestManyTypesViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
TestManyTypesViewModel_ that = (TestManyTypesViewModel_) 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 ((enabled_Boolean != that.enabled_Boolean)) {
return false;
}
if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) {
return false;
}
if (((functionType_Function2 == null) != (that.functionType_Function2 == null))) {
return false;
}
if ((listOfDataClass_List != null ? !listOfDataClass_List.equals(that.listOfDataClass_List) : that.listOfDataClass_List != null)) {
return false;
}
if ((listOfEnumClass_List != null ? !listOfEnumClass_List.equals(that.listOfEnumClass_List) : that.listOfEnumClass_List != null)) {
return false;
}
if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) {
return false;
}
if ((intValue_Int != that.intValue_Int)) {
return false;
}
if ((intValueWithDefault_Int != that.intValueWithDefault_Int)) {
return false;
}
if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) {
return false;
}
if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) {
return false;
}
if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) {
return false;
}
if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) {
return false;
}
if ((integerValue_Int != that.integerValue_Int)) {
return false;
}
if ((boolValue_Boolean != that.boolValue_Boolean)) {
return false;
}
if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) {
return false;
}
if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) {
return false;
}
if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) {
return false;
}
if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) {
return false;
}
if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) {
return false;
}
if (((customClickListener_CustomClickListenerSubclass == null) != (that.customClickListener_CustomClickListenerSubclass == null))) {
return false;
}
if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) {
return false;
}
if ((myProperty_Int != that.myProperty_Int)) {
return false;
}
if ((myNullableProperty_Integer != null ? !myNullableProperty_Integer.equals(that.myNullableProperty_Integer) : that.myNullableProperty_Integer != null)) {
return false;
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (enabled_Boolean ? 1 : 0);
_result = 31 * _result + (stringValue_String != null ? stringValue_String.hashCode() : 0);
_result = 31 * _result + (functionType_Function2 != null ? 1 : 0);
_result = 31 * _result + (listOfDataClass_List != null ? listOfDataClass_List.hashCode() : 0);
_result = 31 * _result + (listOfEnumClass_List != null ? listOfEnumClass_List.hashCode() : 0);
_result = 31 * _result + (nullableStringValue_String != null ? nullableStringValue_String.hashCode() : 0);
_result = 31 * _result + intValue_Int;
_result = 31 * _result + intValueWithDefault_Int;
_result = 31 * _result + intValueWithAnnotation_Int;
_result = 31 * _result + intValueWithRangeAnnotation_Int;
_result = 31 * _result + intValueWithDimenTypeAnnotation_Int;
_result = 31 * _result + intWithMultipleAnnotations_Int;
_result = 31 * _result + integerValue_Int;
_result = 31 * _result + (boolValue_Boolean ? 1 : 0);
_result = 31 * _result + (models_List != null ? models_List.hashCode() : 0);
_result = 31 * _result + (booleanValue_Boolean != null ? booleanValue_Boolean.hashCode() : 0);
_result = 31 * _result + Arrays.hashCode(arrayValue_StringArray);
_result = 31 * _result + (listValue_List != null ? listValue_List.hashCode() : 0);
_result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0);
_result = 31 * _result + (customClickListener_CustomClickListenerSubclass != null ? 1 : 0);
_result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0);
_result = 31 * _result + myProperty_Int;
_result = 31 * _result + (myNullableProperty_Integer != null ? myNullableProperty_Integer.hashCode() : 0);
_result = 31 * _result + delegatedProperty_Int;
return _result;
}
@Override
public String toString() {
return "TestManyTypesViewModel_{" +
"enabled_Boolean=" + enabled_Boolean +
", stringValue_String=" + stringValue_String +
", listOfDataClass_List=" + listOfDataClass_List +
", listOfEnumClass_List=" + listOfEnumClass_List +
", nullableStringValue_String=" + nullableStringValue_String +
", intValue_Int=" + intValue_Int +
", intValueWithDefault_Int=" + intValueWithDefault_Int +
", intValueWithAnnotation_Int=" + intValueWithAnnotation_Int +
", intValueWithRangeAnnotation_Int=" + intValueWithRangeAnnotation_Int +
", intValueWithDimenTypeAnnotation_Int=" + intValueWithDimenTypeAnnotation_Int +
", intWithMultipleAnnotations_Int=" + intWithMultipleAnnotations_Int +
", integerValue_Int=" + integerValue_Int +
", boolValue_Boolean=" + boolValue_Boolean +
", models_List=" + models_List +
", booleanValue_Boolean=" + booleanValue_Boolean +
", arrayValue_StringArray=" + arrayValue_StringArray +
", listValue_List=" + listValue_List +
", clickListener_OnClickListener=" + clickListener_OnClickListener +
", customClickListener_CustomClickListenerSubclass=" + customClickListener_CustomClickListenerSubclass +
", title_StringAttributeData=" + title_StringAttributeData +
", myProperty_Int=" + myProperty_Int +
", myNullableProperty_Integer=" + myNullableProperty_Integer +
", delegatedProperty_Int=" + delegatedProperty_Int +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,781 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testStyleableViewKotlinSources/ModelViewWithParisModel_.java | package com.airbnb.epoxy;
import android.os.AsyncTask;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import com.airbnb.paris.StyleApplierUtils;
import com.airbnb.paris.styles.Style;
import com.airbnb.viewmodeladapter.R;
import java.lang.AssertionError;
import java.lang.CharSequence;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.Runnable;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.lang.ref.WeakReference;
import java.util.Objects;
/**
* Generated file. Do not modify!
*/
public class ModelViewWithParisModel_ extends EpoxyModel<ModelViewWithParis> implements GeneratedModel<ModelViewWithParis>, ModelViewWithParisModelBuilder {
private static final Style DEFAULT_PARIS_STYLE = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build();
private static WeakReference<Style> parisStyleReference_header;
private static WeakReference<Style> parisStyleReference_other;
private static WeakReference<Style> parisStyleReference_default;
private OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
private Style style = DEFAULT_PARIS_STYLE;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public ModelViewWithParis buildView(ViewGroup parent) {
ModelViewWithParis v = new ModelViewWithParis(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final ModelViewWithParis object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) {
AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {
public void run() {
try {
StyleApplierUtils.Companion.assertSameAttributes(new ModelViewWithParisStyleApplier(object), style, DEFAULT_PARIS_STYLE);
}
catch(AssertionError e) {
throw new IllegalStateException("ModelViewWithParisModel_ model at position " + position + " has an invalid style:\n\n" + e.getMessage());
}
}
} );
}
}
@Override
public void bind(final ModelViewWithParis object) {
if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) {
ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object);
styleApplier.apply(style);
object.setTag(R.id.epoxy_saved_view_style, style);
}
super.bind(object);
object.value = value_Int;
}
@Override
public void bind(final ModelViewWithParis object, EpoxyModel previousModel) {
if (!(previousModel instanceof ModelViewWithParisModel_)) {
bind(object);
return;
}
ModelViewWithParisModel_ that = (ModelViewWithParisModel_) previousModel;
if (!Objects.equals(style, that.style)) {
ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object);
styleApplier.apply(style);
object.setTag(R.id.epoxy_saved_view_style, style);
}
super.bind(object);
if ((value_Int != that.value_Int)) {
object.value = value_Int;
}
}
@Override
public void handlePostBind(final ModelViewWithParis object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewWithParisModel_ onBind(
OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(ModelViewWithParis object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewWithParisModel_ onUnbind(
OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final ModelViewWithParis object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewWithParisModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final ModelViewWithParis object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewWithParisModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelViewWithParisModel_ style(Style style) {
onMutation();
this.style = style;
return this;
}
public ModelViewWithParisModel_ styleBuilder(
StyleBuilderCallback<ModelViewWithParisStyleApplier.StyleBuilder> builderCallback) {
ModelViewWithParisStyleApplier.StyleBuilder builder = new ModelViewWithParisStyleApplier.StyleBuilder();
builderCallback.buildStyle(builder.addDefault());
return style(builder.build());
}
/**
* @see ModelViewWithParis#headerStyle(ModelViewWithParisStyleApplier.StyleBuilder)
*/
public ModelViewWithParisModel_ withHeaderStyle() {
Style style = parisStyleReference_header != null ? parisStyleReference_header.get() : null;
if (style == null) {
style = new ModelViewWithParisStyleApplier.StyleBuilder().addHeader().build();
parisStyleReference_header = new WeakReference<>(style);
}
return style(style);
}
/**
* @see ModelViewWithParis#otherStyle(ModelViewWithParisStyleApplier.StyleBuilder)
*/
public ModelViewWithParisModel_ withOtherStyle() {
Style style = parisStyleReference_other != null ? parisStyleReference_other.get() : null;
if (style == null) {
style = new ModelViewWithParisStyleApplier.StyleBuilder().addOther().build();
parisStyleReference_other = new WeakReference<>(style);
}
return style(style);
}
/**
* @see ModelViewWithParis#headerStyle(ModelViewWithParisStyleApplier.StyleBuilder)
*/
public ModelViewWithParisModel_ withDefaultStyle() {
Style style = parisStyleReference_default != null ? parisStyleReference_default.get() : null;
if (style == null) {
style = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build();
parisStyleReference_default = new WeakReference<>(style);
}
return style(style);
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewWithParis#value
*/
public ModelViewWithParisModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
@Override
public ModelViewWithParisModel_ id(long id) {
super.id(id);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public ModelViewWithParisModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence key,
@Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public ModelViewWithParisModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public ModelViewWithParisModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public ModelViewWithParisModel_ show() {
super.show();
return this;
}
@Override
public ModelViewWithParisModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public ModelViewWithParisModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public ModelViewWithParisModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
this.style = DEFAULT_PARIS_STYLE;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelViewWithParisModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelViewWithParisModel_ that = (ModelViewWithParisModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
if ((style != null ? !style.equals(that.style) : that.style != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
_result = 31 * _result + (style != null ? style.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "ModelViewWithParisModel_{" +
"value_Int=" + value_Int +
", style=" + style +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,782 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testStyleableViewKotlinSources | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/testStyleableViewKotlinSources/ksp/ModelViewWithParisModel_.java | package com.airbnb.epoxy;
import android.os.AsyncTask;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import com.airbnb.paris.StyleApplierUtils;
import com.airbnb.paris.styles.Style;
import com.airbnb.viewmodeladapter.R;
import java.lang.AssertionError;
import java.lang.CharSequence;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.Runnable;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import java.lang.ref.WeakReference;
import java.util.Objects;
/**
* Generated file. Do not modify!
*/
public class ModelViewWithParisModel_ extends EpoxyModel<ModelViewWithParis> implements GeneratedModel<ModelViewWithParis>, ModelViewWithParisModelBuilder {
private static final Style DEFAULT_PARIS_STYLE = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build();
private static WeakReference<Style> parisStyleReference_header;
private static WeakReference<Style> parisStyleReference_default;
private OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityChangedListener_epoxyGeneratedModel;
private int value_Int = 0;
private int delegatedProperty_Int = 0;
private Style style = DEFAULT_PARIS_STYLE;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public ModelViewWithParis buildView(ViewGroup parent) {
ModelViewWithParis v = new ModelViewWithParis(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final ModelViewWithParis object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) {
AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {
public void run() {
try {
StyleApplierUtils.Companion.assertSameAttributes(new ModelViewWithParisStyleApplier(object), style, DEFAULT_PARIS_STYLE);
}
catch(AssertionError e) {
throw new IllegalStateException("ModelViewWithParisModel_ model at position " + position + " has an invalid style:\n\n" + e.getMessage());
}
}
} );
}
}
@Override
public void bind(final ModelViewWithParis object) {
if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) {
ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object);
styleApplier.apply(style);
object.setTag(R.id.epoxy_saved_view_style, style);
}
super.bind(object);
object.setValue(value_Int);
object.setDelegatedProperty(delegatedProperty_Int);
}
@Override
public void bind(final ModelViewWithParis object, EpoxyModel previousModel) {
if (!(previousModel instanceof ModelViewWithParisModel_)) {
bind(object);
return;
}
ModelViewWithParisModel_ that = (ModelViewWithParisModel_) previousModel;
if (!Objects.equals(style, that.style)) {
ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object);
styleApplier.apply(style);
object.setTag(R.id.epoxy_saved_view_style, style);
}
super.bind(object);
if ((value_Int != that.value_Int)) {
object.setValue(value_Int);
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
object.setDelegatedProperty(delegatedProperty_Int);
}
}
@Override
public void handlePostBind(final ModelViewWithParis object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewWithParisModel_ onBind(
OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(ModelViewWithParis object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public ModelViewWithParisModel_ onUnbind(
OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final ModelViewWithParis object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewWithParisModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final ModelViewWithParis object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public ModelViewWithParisModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public ModelViewWithParisModel_ style(Style style) {
onMutation();
this.style = style;
return this;
}
public ModelViewWithParisModel_ styleBuilder(
StyleBuilderCallback<ModelViewWithParisStyleApplier.StyleBuilder> builderCallback) {
ModelViewWithParisStyleApplier.StyleBuilder builder = new ModelViewWithParisStyleApplier.StyleBuilder();
builderCallback.buildStyle(builder.addDefault());
return style(builder.build());
}
/**
*
* @see ModelViewWithParis.Companion#headerStyle
*/
public ModelViewWithParisModel_ withHeaderStyle() {
Style style = parisStyleReference_header != null ? parisStyleReference_header.get() : null;
if (style == null) {
style = new ModelViewWithParisStyleApplier.StyleBuilder().addHeader().build();
parisStyleReference_header = new WeakReference<>(style);
}
return style(style);
}
/**
*
* @see ModelViewWithParis.Companion#headerStyle
*/
public ModelViewWithParisModel_ withDefaultStyle() {
Style style = parisStyleReference_default != null ? parisStyleReference_default.get() : null;
if (style == null) {
style = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build();
parisStyleReference_default = new WeakReference<>(style);
}
return style(style);
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewWithParis#setValue(int)
*/
public ModelViewWithParisModel_ value(int value) {
onMutation();
this.value_Int = value;
return this;
}
public int value() {
return value_Int;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see ModelViewWithParis#setDelegatedProperty(int)
*/
public ModelViewWithParisModel_ delegatedProperty(int delegatedProperty) {
onMutation();
this.delegatedProperty_Int = delegatedProperty;
return this;
}
public int delegatedProperty() {
return delegatedProperty_Int;
}
@Override
public ModelViewWithParisModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public ModelViewWithParisModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewWithParisModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public ModelViewWithParisModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public ModelViewWithParisModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public ModelViewWithParisModel_ show() {
super.show();
return this;
}
@Override
public ModelViewWithParisModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public ModelViewWithParisModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public ModelViewWithParisModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.value_Int = 0;
this.delegatedProperty_Int = 0;
this.style = DEFAULT_PARIS_STYLE;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ModelViewWithParisModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
ModelViewWithParisModel_ that = (ModelViewWithParisModel_) 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 ((value_Int != that.value_Int)) {
return false;
}
if ((delegatedProperty_Int != that.delegatedProperty_Int)) {
return false;
}
if ((style != null ? !style.equals(that.style) : that.style != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + value_Int;
_result = 31 * _result + delegatedProperty_Int;
_result = 31 * _result + (style != null ? style.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "ModelViewWithParisModel_{" +
"value_Int=" + value_Int +
", delegatedProperty_Int=" + delegatedProperty_Int +
", style=" + style +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,783 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.String;
import org.jetbrains.annotations.Nullable;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder sectionId(@Nullable("") String sectionId);
SourceViewModelBuilder baseViewProp(int baseViewProp);
SourceViewModelBuilder showDividerWithSetter(Boolean showDividerWithSetter);
SourceViewModelBuilder showDividerWithOverriddenMethod(boolean showDivider);
SourceViewModelBuilder id(long id);
SourceViewModelBuilder id(@androidx.annotation.Nullable Number... ids);
SourceViewModelBuilder id(long id1, long id2);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys);
SourceViewModelBuilder id(@androidx.annotation.Nullable CharSequence key, long id);
SourceViewModelBuilder spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback);
}
| 8,784 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
import org.jetbrains.annotations.Nullable;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends AirEpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable("")
private String sectionId_String = (String) null;
private int baseViewProp_Int = 0;
public SourceViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setSectionId(sectionId_String);
object.baseViewProp(baseViewProp_Int);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
object.setSectionId(sectionId_String);
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
object.baseViewProp(baseViewProp_Int);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (String) null
*
* @see SourceView#setSectionId(String)
*/
public SourceViewModel_ sectionId(@Nullable("") String sectionId) {
onMutation();
this.sectionId_String = sectionId;
return this;
}
@Nullable("")
public String sectionId() {
return sectionId_String;
}
/**
* <i>Optional</i>: Default value is 0
*
* @see BaseView#baseViewProp(int)
*/
public SourceViewModel_ baseViewProp(int baseViewProp) {
onMutation();
this.baseViewProp_Int = baseViewProp;
return this;
}
public int baseViewProp() {
return baseViewProp_Int;
}
public SourceViewModel_ showDividerWithSetter(Boolean showDividerWithSetter) {
onMutation();
super.setShowDividerWithSetter(showDividerWithSetter);
return this;
}
public Boolean showDividerWithSetter() {
return super.getShowDividerWithSetter();
}
@Override
public SourceViewModel_ showDividerWithOverriddenMethod(boolean showDivider) {
super.showDividerWithOverriddenMethod(showDivider);
return this;
}
@Override
public SourceViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public SourceViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key,
@androidx.annotation.Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public SourceViewModel_ id(@androidx.annotation.Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int layoutRes) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(
@androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.sectionId_String = (String) null;
this.baseViewProp_Int = 0;
super.setShowDivider(null);
super.setShowDividerWithSetter(null);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 ((sectionId_String != null ? !sectionId_String.equals(that.sectionId_String) : that.sectionId_String != null)) {
return false;
}
if ((baseViewProp_Int != that.baseViewProp_Int)) {
return false;
}
if ((getShowDivider() != null ? !getShowDivider().equals(that.getShowDivider()) : that.getShowDivider() != null)) {
return false;
}
if ((getShowDividerWithSetter() != null ? !getShowDividerWithSetter().equals(that.getShowDividerWithSetter()) : that.getShowDividerWithSetter() != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (sectionId_String != null ? sectionId_String.hashCode() : 0);
_result = 31 * _result + baseViewProp_Int;
_result = 31 * _result + (getShowDivider() != null ? getShowDivider().hashCode() : 0);
_result = 31 * _result + (getShowDividerWithSetter() != null ? getShowDividerWithSetter().hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"sectionId_String=" + sectionId_String +
", baseViewProp_Int=" + baseViewProp_Int +
", showDivider=" + getShowDivider() +
", showDividerWithSetter=" + getShowDividerWithSetter() +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,785 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling/ksp/SourceViewModelBuilder.java | package com.airbnb.epoxy;
import android.view.View;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
@EpoxyBuildScope
public interface SourceViewModelBuilder {
SourceViewModelBuilder onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener);
SourceViewModelBuilder keyedListener(
@Nullable KeyedListener<?, View.OnClickListener> keyedListener);
SourceViewModelBuilder id(long p0);
SourceViewModelBuilder id(@Nullable Number... p0);
SourceViewModelBuilder id(long p0, long p1);
SourceViewModelBuilder id(@Nullable CharSequence p0);
SourceViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1);
SourceViewModelBuilder id(@Nullable CharSequence p0, long p1);
SourceViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0);
}
| 8,786 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling | Create_ds/epoxy/epoxy-processortest/src/test/resources/ViewProcessorTest/wildcardHandling/ksp/SourceViewModel_.java | package com.airbnb.epoxy;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.UnsupportedOperationException;
/**
* Generated file. Do not modify!
*/
public class SourceViewModel_ extends EpoxyModel<SourceView> implements GeneratedModel<SourceView>, SourceViewModelBuilder {
private OnModelBoundListener<SourceViewModel_, SourceView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<SourceViewModel_, SourceView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<SourceViewModel_, SourceView> onModelVisibilityChangedListener_epoxyGeneratedModel;
@Nullable
private KeyedListener<?, View.OnClickListener> keyedListener_KeyedListener = (KeyedListener<?, View.OnClickListener>) null;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
protected int getViewType() {
return 0;
}
@Override
public SourceView buildView(ViewGroup parent) {
SourceView v = new SourceView(parent.getContext());
v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT));
return v;
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final SourceView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final SourceView object) {
super.bind(object);
object.setKeyedListener(keyedListener_KeyedListener);
}
@Override
public void bind(final SourceView object, EpoxyModel previousModel) {
if (!(previousModel instanceof SourceViewModel_)) {
bind(object);
return;
}
SourceViewModel_ that = (SourceViewModel_) previousModel;
super.bind(object);
if (((keyedListener_KeyedListener == null) != (that.keyedListener_KeyedListener == null))) {
object.setKeyedListener(keyedListener_KeyedListener);
}
}
@Override
public void handlePostBind(final SourceView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onBind(OnModelBoundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(SourceView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
object.setKeyedListener((KeyedListener<?, View.OnClickListener>) null);
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public SourceViewModel_ onUnbind(OnModelUnboundListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final SourceView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final SourceView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public SourceViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<SourceViewModel_, SourceView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Optional</i>: Default value is (KeyedListener<?, View.OnClickListener>) null
*
* @see SourceView#setKeyedListener(KeyedListener<?, View.OnClickListener>)
*/
public SourceViewModel_ keyedListener(
@Nullable KeyedListener<?, View.OnClickListener> keyedListener) {
onMutation();
this.keyedListener_KeyedListener = keyedListener;
return this;
}
@Nullable
public KeyedListener<?, View.OnClickListener> keyedListener() {
return keyedListener_KeyedListener;
}
@Override
public SourceViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public SourceViewModel_ layout(@LayoutRes int p0) {
throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views.");
}
@Override
public SourceViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public SourceViewModel_ show() {
super.show();
return this;
}
@Override
public SourceViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public SourceViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically.");
}
@Override
public SourceViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
this.keyedListener_KeyedListener = (KeyedListener<?, View.OnClickListener>) null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SourceViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
SourceViewModel_ that = (SourceViewModel_) 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 (((keyedListener_KeyedListener == null) != (that.keyedListener_KeyedListener == null))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (keyedListener_KeyedListener != null ? 1 : 0);
return _result;
}
@Override
public String toString() {
return "SourceViewModel_{" +
"keyedListener_KeyedListener=" + keyedListener_KeyedListener +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,787 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/testModelWithHolderGeneratesNewHolderMethod/AbstractModelWithHolder_.java | package com.airbnb.epoxy;
import android.view.ViewParent;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class AbstractModelWithHolder_ extends AbstractModelWithHolder implements GeneratedModel<Holder>, AbstractModelWithHolderBuilder {
private OnModelBoundListener<AbstractModelWithHolder_, Holder> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AbstractModelWithHolder_, Holder> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AbstractModelWithHolder_, Holder> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AbstractModelWithHolder_, Holder> onModelVisibilityChangedListener_epoxyGeneratedModel;
public AbstractModelWithHolder_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Holder object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Holder object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractModelWithHolder_ onBind(
OnModelBoundListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Holder object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractModelWithHolder_ onUnbind(
OnModelUnboundListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Holder object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractModelWithHolder_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Holder object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractModelWithHolder_ onVisibilityChanged(
OnModelVisibilityChangedListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public int value() {
return super.getValue();
}
@Override
public AbstractModelWithHolder_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public AbstractModelWithHolder_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AbstractModelWithHolder_ show() {
super.show();
return this;
}
@Override
public AbstractModelWithHolder_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AbstractModelWithHolder_ hide() {
super.hide();
return this;
}
@Override
protected Holder createNewHolder(ViewParent parent) {
return new Holder();
}
@Override
public AbstractModelWithHolder_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AbstractModelWithHolder_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AbstractModelWithHolder_ that = (AbstractModelWithHolder_) 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 ((getValue() != that.getValue())) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + getValue();
return _result;
}
@Override
public String toString() {
return "AbstractModelWithHolder_{" +
"value=" + getValue() +
"}" + super.toString();
}
}
| 8,788 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/testModelWithHolderGeneratesNewHolderMethod | Create_ds/epoxy/epoxy-processortest/src/test/resources/testModelWithHolderGeneratesNewHolderMethod/ksp/AbstractModelWithHolder_.java | package com.airbnb.epoxy;
import android.view.ViewParent;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class AbstractModelWithHolder_ extends AbstractModelWithHolder implements GeneratedModel<Holder>, AbstractModelWithHolderBuilder {
private OnModelBoundListener<AbstractModelWithHolder_, Holder> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<AbstractModelWithHolder_, Holder> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<AbstractModelWithHolder_, Holder> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<AbstractModelWithHolder_, Holder> onModelVisibilityChangedListener_epoxyGeneratedModel;
public AbstractModelWithHolder_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final Holder object, final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void handlePostBind(final Holder object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractModelWithHolder_ onBind(
OnModelBoundListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(Holder object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public AbstractModelWithHolder_ onUnbind(
OnModelUnboundListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final Holder object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractModelWithHolder_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final Holder object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public AbstractModelWithHolder_ onVisibilityChanged(
OnModelVisibilityChangedListener<AbstractModelWithHolder_, Holder> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
public AbstractModelWithHolder_ value(int value) {
onMutation();
super.setValue(value);
return this;
}
public int value() {
return super.getValue();
}
@Override
public AbstractModelWithHolder_ id(long p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public AbstractModelWithHolder_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public AbstractModelWithHolder_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public AbstractModelWithHolder_ show() {
super.show();
return this;
}
@Override
public AbstractModelWithHolder_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public AbstractModelWithHolder_ hide() {
super.hide();
return this;
}
@Override
protected Holder createNewHolder(ViewParent parent) {
return new Holder();
}
@Override
public AbstractModelWithHolder_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
super.setValue(0);
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof AbstractModelWithHolder_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
AbstractModelWithHolder_ that = (AbstractModelWithHolder_) 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 ((getValue() != that.getValue())) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + getValue();
return _result;
}
@Override
public String toString() {
return "AbstractModelWithHolder_{" +
"value=" + getValue() +
"}" + super.toString();
}
}
| 8,789 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerProcessorTest | Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerProcessorTest/controllerWithAutoModel/ControllerWithAutoModel_EpoxyHelper.java | package com.airbnb.epoxy.adapter;
import com.airbnb.epoxy.BasicModelWithAttribute_;
import com.airbnb.epoxy.ControllerHelper;
import com.airbnb.epoxy.EpoxyModel;
import java.lang.IllegalStateException;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ControllerWithAutoModel_EpoxyHelper extends ControllerHelper<ControllerWithAutoModel> {
private final ControllerWithAutoModel controller;
private EpoxyModel modelWithAttribute2;
private EpoxyModel modelWithAttribute1;
public ControllerWithAutoModel_EpoxyHelper(ControllerWithAutoModel controller) {
this.controller = controller;
}
@Override
public void resetAutoModels() {
validateModelsHaveNotChanged();
controller.modelWithAttribute2 = new BasicModelWithAttribute_();
controller.modelWithAttribute2.id(-1);
controller.modelWithAttribute1 = new BasicModelWithAttribute_();
controller.modelWithAttribute1.id(-2);
saveModelsForNextValidation();
}
private void validateModelsHaveNotChanged() {
validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -1);
validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -2);
validateModelHashCodesHaveNotChanged(controller);
}
private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject,
String fieldName, int id) {
if (expectedObject != actualObject) {
throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
if (actualObject != null && actualObject.id() != id) {
throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
}
private void saveModelsForNextValidation() {
modelWithAttribute2 = controller.modelWithAttribute2;
modelWithAttribute1 = controller.modelWithAttribute1;
}
}
| 8,790 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerProcessorTest/controllerWithAutoModel | Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerProcessorTest/controllerWithAutoModel/ksp/ControllerWithAutoModel_EpoxyHelper.java | package com.airbnb.epoxy.adapter;
import android.view.View;
import com.airbnb.epoxy.BasicModelWithAttribute_;
import com.airbnb.epoxy.ControllerHelper;
import com.airbnb.epoxy.EpoxyModel;
import com.airbnb.epoxy.processortest2.ProcessorTest2Model;
import java.lang.IllegalStateException;
import java.lang.Override;
import java.lang.String;
/**
* Generated file. Do not modify!
*/
public class ControllerWithAutoModel_EpoxyHelper extends ControllerHelper<ControllerWithAutoModel> {
private final ControllerWithAutoModel controller;
private EpoxyModel modelFromClassPath;
private EpoxyModel modelWithAttribute2;
private EpoxyModel modelWithAttribute1;
public ControllerWithAutoModel_EpoxyHelper(ControllerWithAutoModel controller) {
this.controller = controller;
}
@Override
public void resetAutoModels() {
validateModelsHaveNotChanged();
controller.modelFromClassPath = new ProcessorTest2Model<View>();
controller.modelFromClassPath.id(-1);
controller.modelWithAttribute2 = new BasicModelWithAttribute_();
controller.modelWithAttribute2.id(-2);
controller.modelWithAttribute1 = new BasicModelWithAttribute_();
controller.modelWithAttribute1.id(-3);
saveModelsForNextValidation();
}
private void validateModelsHaveNotChanged() {
validateSameModel(modelFromClassPath, controller.modelFromClassPath, "modelFromClassPath", -1);
validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -2);
validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -3);
validateModelHashCodesHaveNotChanged(controller);
}
private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject,
String fieldName, int id) {
if (expectedObject != actualObject) {
throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
if (actualObject != null && actualObject.id() != id) {
throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")");
}
}
private void saveModelsForNextValidation() {
modelFromClassPath = controller.modelFromClassPath;
modelWithAttribute2 = controller.modelWithAttribute2;
modelWithAttribute1 = controller.modelWithAttribute1;
}
}
| 8,791 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfig/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public BaseModelViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int layoutRes) {
super.layout(layoutRes);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,792 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfig | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfig/ksp/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,793 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfig/ksp | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfig/ksp/actual/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,794 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfigIsOverriddenByViewSetting/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends EpoxyModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public BaseModelViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int layoutRes) {
super.layout(layoutRes);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,795 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfigIsOverriddenByViewSetting | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfigIsOverriddenByViewSetting/ksp/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends EpoxyModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,796 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfigIsOverriddenByViewSetting/ksp | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelFromPackageConfigIsOverriddenByViewSetting/ksp/actual/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends EpoxyModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,797 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithAttribute/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(2);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
public BaseModelViewModel_ baseModelString(String baseModelString) {
onMutation();
super.baseModelString = baseModelString;
return this;
}
public String baseModelString() {
return baseModelString;
}
@Override
public BaseModelViewModel_ id(long id) {
super.id(id);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... ids) {
super.id(ids);
return this;
}
@Override
public BaseModelViewModel_ id(long id1, long id2) {
super.id(id1, id2);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key) {
super.id(key);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) {
super.id(key, otherKeys);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence key, long id) {
super.id(key, id);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int layoutRes) {
super.layout(layoutRes);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(
@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) {
super.spanSizeOverride(spanSizeCallback);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean show) {
super.show(show);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.baseModelString = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
if ((baseModelString != null ? !baseModelString.equals(that.baseModelString) : that.baseModelString != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
_result = 31 * _result + (baseModelString != null ? baseModelString.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
", baseModelString=" + baseModelString +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,798 |
0 | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithAttribute | Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithAttribute/ksp/BaseModelViewModel_.java | package com.airbnb.epoxy;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.CharSequence;
import java.lang.IllegalArgumentException;
import java.lang.IllegalStateException;
import java.lang.Number;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.BitSet;
/**
* Generated file. Do not modify!
*/
public class BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder {
private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(2);
private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel;
private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel;
private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel;
private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel;
/**
* Bitset index: 0
*/
@NonNull
private String clickListener_String;
public BaseModelViewModel_() {
super();
}
@Override
public void addTo(EpoxyController controller) {
super.addTo(controller);
addWithDebugValidation(controller);
if (!assignedAttributes_epoxyGeneratedModel.get(0)) {
throw new IllegalStateException("A value is required for setClickListener");
}
}
@Override
public void handlePreBind(final EpoxyViewHolder holder, final BaseModelView object,
final int position) {
validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position);
}
@Override
public void bind(final BaseModelView object) {
super.bind(object);
object.setClickListener(clickListener_String);
}
@Override
public void bind(final BaseModelView object, EpoxyModel previousModel) {
if (!(previousModel instanceof BaseModelViewModel_)) {
bind(object);
return;
}
BaseModelViewModel_ that = (BaseModelViewModel_) previousModel;
super.bind(object);
if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
object.setClickListener(clickListener_String);
}
}
@Override
public void handlePostBind(final BaseModelView object, int position) {
if (onModelBoundListener_epoxyGeneratedModel != null) {
onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position);
}
validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position);
}
/**
* Register a listener that will be called when this model is bound to a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onBind(
OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelBoundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void unbind(BaseModelView object) {
super.unbind(object);
if (onModelUnboundListener_epoxyGeneratedModel != null) {
onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object);
}
}
/**
* Register a listener that will be called when this model is unbound from a view.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
* <p>
* You may clear the listener by setting a null value, or by calling {@link #reset()}
*/
public BaseModelViewModel_ onUnbind(
OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelUnboundListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityStateChanged(int visibilityState, final BaseModelView object) {
if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState);
}
super.onVisibilityStateChanged(visibilityState, object);
}
/**
* Register a listener that will be called when this model visibility state has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityStateChanged(
OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener;
return this;
}
@Override
public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth,
int visibleHeight, int visibleWidth, final BaseModelView object) {
if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) {
onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth);
}
super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object);
}
/**
* Register a listener that will be called when this model visibility has changed.
* <p>
* The listener will contribute to this model's hashCode state per the {@link
* com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules.
*/
public BaseModelViewModel_ onVisibilityChanged(
OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) {
onMutation();
this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener;
return this;
}
/**
* <i>Required.</i>
*
* @see BaseModelView#setClickListener(String)
*/
public BaseModelViewModel_ clickListener(@NonNull String clickListener) {
if (clickListener == null) {
throw new IllegalArgumentException("clickListener cannot be null");
}
assignedAttributes_epoxyGeneratedModel.set(0);
onMutation();
this.clickListener_String = clickListener;
return this;
}
@NonNull
public String clickListener() {
return clickListener_String;
}
public BaseModelViewModel_ baseModelString(String baseModelString) {
onMutation();
super.baseModelString = baseModelString;
return this;
}
public String baseModelString() {
return baseModelString;
}
@Override
public BaseModelViewModel_ id(long p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable Number... p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(long p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0) {
super.id(p0);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) {
super.id(p0, p1);
return this;
}
@Override
public BaseModelViewModel_ layout(@LayoutRes int p0) {
super.layout(p0);
return this;
}
@Override
public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) {
super.spanSizeOverride(p0);
return this;
}
@Override
public BaseModelViewModel_ show() {
super.show();
return this;
}
@Override
public BaseModelViewModel_ show(boolean p0) {
super.show(p0);
return this;
}
@Override
public BaseModelViewModel_ hide() {
super.hide();
return this;
}
@Override
@LayoutRes
protected int getDefaultLayout() {
return 1;
}
@Override
public BaseModelViewModel_ reset() {
onModelBoundListener_epoxyGeneratedModel = null;
onModelUnboundListener_epoxyGeneratedModel = null;
onModelVisibilityStateChangedListener_epoxyGeneratedModel = null;
onModelVisibilityChangedListener_epoxyGeneratedModel = null;
assignedAttributes_epoxyGeneratedModel.clear();
this.clickListener_String = null;
super.baseModelString = null;
super.reset();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof BaseModelViewModel_)) {
return false;
}
if (!super.equals(o)) {
return false;
}
BaseModelViewModel_ that = (BaseModelViewModel_) 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 ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) {
return false;
}
if ((baseModelString != null ? !baseModelString.equals(that.baseModelString) : that.baseModelString != null)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int _result = super.hashCode();
_result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
_result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0);
_result = 31 * _result + (baseModelString != null ? baseModelString.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "BaseModelViewModel_{" +
"clickListener_String=" + clickListener_String +
", baseModelString=" + baseModelString +
"}" + super.toString();
}
@Override
public int getSpanSize(int totalSpanCount, int position, int itemCount) {
return totalSpanCount;
}
}
| 8,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.