Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finally, I decided to discard the
Item
interface. It brings meaning can not offset the trouble it brings. So, I useObject
to instead of it, and keep the interface butDeprecated
so that we don't change our old type classes, theItem
is useless and harmless now.Chinese:
对于 MultiType
Item
这个接口,最后我决定抛弃它,因为它带来的意义无法抵消它带来的麻烦,比如我们无法在一个纯 java module 里定义我们的 item types(若要如此,这个 module 势必要引用 MultiType,但实际上它不应该引用任何 Android library);另外,对于嵌套 item class,从面向对象观点看来它们不应该实现Item
接口。因此现在使用Object
替代Item
,但仍然保留了Item
接口,只是标记了废弃,使得开发者们无须修改旧的代码即可兼容。虽然它不再被使用,但即使使用了它也是没关系的,它是无用的、无害的,不会产生任何影响。