epoxy-adapter / com.airbnb.epoxy / EpoxyModel / addIf

addIf

open fun addIf(condition: Boolean, @NonNull controller: EpoxyController): Unit

Add this model to the given controller if the condition is true. Can only be called from inside EpoxyController#buildModels().

open fun addIf(@NonNull predicate: EpoxyModel.AddPredicate, @NonNull controller: EpoxyController): Unit

Add this model to the given controller if the AddPredicate return true. Can only be called from inside EpoxyController#buildModels().