Back to project page Buckets.
The source code is released under:
Apache License
If you think the Android project Buckets listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ru.noties.buckets; /*from w w w. ja v a2s .c om*/ import android.app.Activity; /** * Created by Dimitry Ivanov (mail@dimitryivanov.ru) on 28.12.2014. */ public abstract class AbsController<A extends Activity & IBucketUser, B extends Bucket> implements IController { private A mActivity; private B mBucket; private boolean mIsInvalidated; public AbsController(A activity, B bucket) { this.mActivity = activity; this.mBucket = bucket; } public A getActivity() { return mActivity; } public B getBucket() { return mBucket; } @Override public final void onInvalidate() { // release the sources mIsInvalidated = true; mActivity = null; mBucket = null; onRelease(); } protected void onRelease() {} public boolean isInvalidated() { return mIsInvalidated; } }