package com.airbnb.epoxy.models; import android.support.annotation.LayoutRes; import com.airbnb.epoxy.EpoxyController; import com.airbnb.epoxy.EpoxyViewHolder; import com.airbnb.epoxy.GeneratedModel; import com.airbnb.epoxy.OnModelBoundListener; import com.airbnb.epoxy.OnModelUnboundListener; 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 ModelWithIntDef_ extends ModelWithIntDef implements GeneratedModel<Object> { private OnModelBoundListener<ModelWithIntDef_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithIntDef_, Object> onModelUnboundListener_epoxyGeneratedModel; public ModelWithIntDef_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, 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 ModelWithIntDef_ onBind(OnModelBoundListener<ModelWithIntDef_, 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 ModelWithIntDef_ onUnbind(OnModelUnboundListener<ModelWithIntDef_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } public ModelWithIntDef_ type(@ModelWithIntDef.MyType int type) { onMutation(); super.type = type; return this; } @ModelWithIntDef.MyType public int type() { return type; } @Override public ModelWithIntDef_ id(long id) { super.id(id); return this; } @Override public ModelWithIntDef_ id(Number... ids) { super.id(ids); return this; } @Override public ModelWithIntDef_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithIntDef_ id(CharSequence key) { super.id(key); return this; } @Override public ModelWithIntDef_ id(CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithIntDef_ layout(@LayoutRes int arg0) { super.layout(arg0); return this; } @Override public ModelWithIntDef_ show() { super.show(); return this; } @Override public ModelWithIntDef_ show(boolean show) { super.show(show); return this; } @Override public ModelWithIntDef_ hide() { super.hide(); return this; } @Override public ModelWithIntDef_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; super.type = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithIntDef_)) { return false; } if (!super.equals(o)) { return false; } ModelWithIntDef_ that = (ModelWithIntDef_) o; if ((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null)) { return false; } if ((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null)) { return false; } if (type != that.type) { 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 + type; return result; } @Override public String toString() { return "ModelWithIntDef_{" + "type=" + type + "}" + super.toString(); } }