BoltsAndroid 底层类库集合
Bolts 是一款底层类库集合, 在后台实现异步操作, 并提供接口反馈当前异步执行的程度 (可以通过接口实现UI进度更新), 最后反馈执行的结果给UI主线程, 与AsyncTask比较: (1)使用的是无大小限制的线程池; (2)任务可组合可级联,防止了代码耦合。
使用
dependencies { compile 'com.parse.bolts:bolts-tasks:1.4.0' compile 'com.parse.bolts:bolts-applinks:1.4.0'}
示例代码
/** Gets a String asynchronously. */ public Task<String> getStringAsync() { // Let's suppose getIntAsync() returns a Task<Integer>. return getIntAsync().continueWith( // This Continuation is a function which takes an Integer as input, // and provides a String as output. It must take an Integer because // that's what was returned from the previous Task. new Continuation<Integer, String>() { // The Task getIntAsync() returned is passed to "then" for convenience. public String then(Task<Integer> task) throws Exception { Integer number = task.getResult(); return String.format("%d", Locale.US, number); } } ); }
评论
yii-chinese中文编码集合类库
目前该类库可以实现,简体中文<=>繁体中文编码互换,简体中文、繁体中文=>拼音单向转换,简体中文、繁体中文<=>UTF8编码转换,简体中文、繁体中文=>Unicod
yii-chinese中文编码集合类库
0
MKFoundationKitNSFoundation 类集合
MKFoundationKit 是个 NSFoundation 类的集合,帮助用户加快开发速度。
MKFoundationKitNSFoundation 类集合
0
MKFoundationKitNSFoundation 类集合
MKFoundationKit是个NSFoundation类的集合,帮助用户加快开发速度。
MKFoundationKitNSFoundation 类集合
0
DejalAppKitCategoriesAppKit 类集合
DejalAppKitCategories 是 OS X 上 AppKit 类集合,添加了一些有用的
DejalAppKitCategoriesAppKit 类集合
0
DejalAppKitCategoriesAppKit 类集合
DejalAppKitCategories是OSX上AppKit类集合,添加了一些有用的方法到类中:NSMenu,NSTableView,NSTextView等等。 特征NSButton+Dejal:
DejalAppKitCategoriesAppKit 类集合
0
ConcurrentLinkedHashMapJava高性能集合类
ConcurrentLinkedHashMap是java.util.LinkedHashMap的一个高性能实现。主要用于软件缓存。示例代码:EvictionListener<K,V>lis
ConcurrentLinkedHashMapJava高性能集合类
0