/** * create data-binding for target object. * * @param target the target object. */ public DataBinding(T target) { Throwables.checkNull(target); this.mTarget = target; }
/** * create list binder callback with item manager. * @param mCallback the item manager. */ public BaseListPropertyCallback(IItemManager<T> mCallback) { Throwables.checkNull(mCallback); this.mCallback = mCallback; }
/** * set the property interceptor . default is {@linkplain PropertyInterceptor#NULL} * @param interceptor the target property interceptor. * @since 1.1.3 */ protected void _setPropertyInterceptor(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); this._mInterceptor = interceptor; }
/** * set the equals comparator * * @param comparator the equals comparator * @since 1.0.2 */ protected void _setEqualsComparator(EqualsComparator comparator) { Throwables.checkNull(comparator); this._mEqualsComparator = comparator; }
/** * create batch base view binder for target view * @param mBinder the binder impl * @param view the view . on android is any child of 'android.view.View'. */ public BatchViewBinder(Binder<T> mBinder, Object view) { Throwables.checkNull(mBinder); Throwables.checkNull(view); this.mBinder = mBinder; this.mView = view; }
/** * set the equals comparator * * @param comparator the equals comparator * @since 1.0.2 */ protected void _setEqualsComparator(EqualsComparator comparator) { Throwables.checkNull(comparator); this._mEqualsComparator = comparator; }
/** * set the property interceptor . default is {@linkplain PropertyInterceptor#NULL} * @param interceptor the target property interceptor. * @since 1.1.3 */ protected void _setPropertyInterceptor(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); this._mInterceptor = interceptor; }
/** * create data-binding for target object. * * @param target the target object. */ public DataBinding(T target) { Throwables.checkNull(target); this.mTarget = target; }
/** * create batch base view binder for target view * @param mBinder the binder impl * @param view the view . on android is any child of 'android.view.View'. */ public BatchViewBinder(Binder<T> mBinder, Object view) { Throwables.checkNull(mBinder); Throwables.checkNull(view); this.mBinder = mBinder; this.mView = view; }
/** * apply the all properties with target interceptor. * * @param interceptor the interceptor * @since 1.0.8 */ public void applyProperties(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); throw new UnsupportedOperationException("you must override this method."); }
/*public*/ AdapterItemManager(Callback callback, AdapterManager.IHeaderFooterManager ifm, List<T> list) { Throwables.checkNull(callback); this.mManager = ifm; this.mCallback = callback; this.mDatas = list != null ? new ArrayList<T>(list) : new ArrayList<T>(); }
/** * create base type adapter for target properties. * @param props the properties. can't be null. */ public BaseTypeAdapter(GsonProperty[] props){ Throwables.checkNull(props); this.mProps = new ArrayList<GsonProperty>(); for (GsonProperty prop : props){ addGsonProperty(prop); } }
/** * create binder for target data mediator. * @param mMediator the target data mediator. */ protected Binder(DataMediator<T> mMediator) { Throwables.checkNull(mMediator); this.mMediator = mMediator; this.mMap = shouldUseWeakMap() ? new WeakHashMap<Object, DataMediatorCallback<T>>() : new HashMap<Object, DataMediatorCallback<T>>(); }
/** * create binder for target data mediator. * @param mMediator the target data mediator. */ protected Binder(DataMediator<T> mMediator) { Throwables.checkNull(mMediator); this.mMediator = mMediator; this.mMap = shouldUseWeakMap() ? new WeakHashMap<Object, DataMediatorCallback<T>>() : new HashMap<Object, DataMediatorCallback<T>>(); }
/** * apply the data to target consumer. * @param consumer the data consumer * @since 1.1.2 */ public void applyTo(DataConsumer<? super T> consumer){ Throwables.checkNull(consumer); consumer.accept(_getTarget()); } /**
/** * apply the data to target consumer. * @param consumer the data consumer * @since 1.1.2 */ public void applyTo(DataConsumer<? super T> consumer){ Throwables.checkNull(consumer); consumer.accept(_getTarget()); } /**
@Override public void applyProperties(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); startBatchApply(interceptor) .addProperty(PROP_state, getState()) .apply(); }
@Override public void applyProperties(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); startBatchApply(interceptor) .addProperty(PROP_state, getState()) .apply(); }
@Override public void applyProperties(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); startBatchApply(interceptor) .addProperty(PROP_AGE, getAge()) .addProperty(PROP_NAME, getName()) .addProperty(PROP_ID, getId()) .addProperty(PROP_TAGS, getTags()) .apply(); }
@Override public void applyProperties(PropertyInterceptor interceptor) { Throwables.checkNull(interceptor); startBatchApply(interceptor) .addProperty(PROP_AGE, getAge()) .addProperty(PROP_NAME, getName()) .addProperty(PROP_ID, getId()) .addProperty(PROP_TAGS, getTags()) .apply(); }