本文整理汇总了Java中com.wangjie.androidbucket.utils.ABTextUtil.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java ABTextUtil.isEmpty方法的具体用法?Java ABTextUtil.isEmpty怎么用?Java ABTextUtil.isEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.wangjie.androidbucket.utils.ABTextUtil
的用法示例。
在下文中一共展示了ABTextUtil.isEmpty方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setItems
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public MyRapidFloatingActionContentLabelList setItems(List<RFACLabelItem> items) {
if(!ABTextUtil.isEmpty(items)) {
this.items = items;
}
return this;
}
示例2: remove
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public static Object remove(String tagUUID, StorageKey key) {
if (null == key) {
return null;
}
HashMap<StorageKey, WeakReference<Object>> extraMapper = storageMapper.get(tagUUID);
if (null == extraMapper) {
return null;
}
WeakReference<Object> ref = extraMapper.remove(key);
if (ABTextUtil.isEmpty(extraMapper)) {
storageMapper.remove(tagUUID);
}
return null == ref ? null : ref.get();
}
示例3: startActivity
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public void startActivity(Context packageContext, Class<?> cls){
if(isUsed){
Logger.e(TAG, this + " can not be reuse!");
return;
}
intent.setClass(packageContext, cls);
if(!ABTextUtil.isEmpty(extras)){
Set<Map.Entry<StorageKey, Object>> entrySet = extras.entrySet();
for(Map.Entry<StorageKey, Object> entry : entrySet){
StoragePool.storage(uuid, entry.getKey(), entry.getValue());
}
}
isUsed = true;
packageContext.startActivity(intent);
}
示例4: unregister
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public void unregister(@NonNull Object tag, @NonNull Observable observable) {
List<Subject> subjects = subjectMapper.get(tag);
if (null != subjects) {
subjects.remove((Subject) observable);
if (ABTextUtil.isEmpty(subjects)) {
subjectMapper.remove(tag);
}
}
if (DEBUG) Log.d(TAG, "[unregister]subjectMapper: " + subjectMapper);
}
示例5: post
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void post(@NonNull Object tag, @NonNull Object content) {
List<Subject> subjectList = subjectMapper.get(tag);
if (!ABTextUtil.isEmpty(subjectList)) {
for (Subject subject : subjectList) {
subject.onNext(content);
}
}
if (DEBUG) Log.d(TAG, "[send]subjectMapper: " + subjectMapper);
}
示例6: clear
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public void clear() {
if (!ABTextUtil.isEmpty(registeredObservable)) {
for (ObservableWrapper observableWrapper : registeredObservable) {
RxBus.get().unregister(observableWrapper.getTag(), observableWrapper.getObservable());
}
}
}
示例7: onLoadReeds
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
@Override
public void onLoadReeds(List<Feed> feedList) {
if (!ABTextUtil.isEmpty(feedList)) {
int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
int insertPos = firstVisibleItemPosition < 0 ? 0 : firstVisibleItemPosition + 1;
adapter.getList().addAll(insertPos, feedList);
adapter.notifyItemInserted(insertPos);
}
}
示例8: deleteFeed
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
@Override
public void deleteFeed() {
List<Feed> list = adapter.getList();
if (!ABTextUtil.isEmpty(list)) {
list.remove(0);
adapter.notifyItemRemoved(0);
}
}
示例9: parserObservableEventAnnotations
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public <T> void parserObservableEventAnnotations(Method method) throws Exception {
if (null == method || !method.isAnnotationPresent(Accept.class)) {
return;
}
Class[] params = method.getParameterTypes();
// 参数必须是两个,第1个必须是Object类型的tag
if (null == params || 2 != params.length || !Object.class.isAssignableFrom(params[0])) {
throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object)");
}
Accept accept = method.getAnnotation(Accept.class);
AcceptType[] acceptTypes = accept.value();
// 默认clazz参数类型
Class<T> targetClazz = params[1];
// 默认clazz参数类型的全类名
String targetTag = targetClazz.getName();
Class<T> specClazz;
String specTag;
int acceptTypeLength = null == acceptTypes ? 0 : acceptTypes.length;
switch (acceptTypeLength) {
case 0: // 如果acceptType是空,则说明具体的类型是params[1],所以params[1]不能为Object类型
if (Object.class.equals(targetClazz)) {
throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object)");
}
registerObservable(method, targetTag, targetClazz, accept.acceptScheduler());
break;
case 1: // 如果只有一个,如果acceptType中tag不为空,则使用
// 默认clazz参数类型,acceptType中指定clazz优先
specClazz = acceptTypes[0].clazz();
if (!Object.class.equals(specClazz)) {
targetClazz = specClazz;
}
if (Object.class.equals(targetClazz)) {
throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object) OR clazz of @AcceptType");
}
targetTag = targetClazz.getName();
// 默认tag参数类型的全类名,acceptType中指定tag优先
specTag = acceptTypes[0].tag();
if (!ABTextUtil.isEmpty(specTag)) {
targetTag = specTag;
}
registerObservable(method, targetTag, targetClazz, accept.acceptScheduler());
break;
default: // 如果有多个,则params[1]必须是Object
if (!Object.class.equals(targetClazz)) {
throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, Object object)");
}
for (AcceptType acceptType : acceptTypes) {
specClazz = acceptType.clazz();
specTag = acceptType.tag();
// 默认tag参数类型的全名,acceptType中指定tag优先
registerObservable(method, ABTextUtil.isEmpty(specTag) ? specClazz.getName() : specTag, specClazz, accept.acceptScheduler());
}
break;
}
}
示例10: setItems
import com.wangjie.androidbucket.utils.ABTextUtil; //导入方法依赖的package包/类
public RapidFloatingActionContentLabelList setItems(List<RFACLabelItem> items) {
if (!ABTextUtil.isEmpty(items)) {
this.items = items;
}
return this;
}
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:7,代码来源:RapidFloatingActionContentLabelList.java