Browse Source

更新文档

drake 4 years ago
parent
commit
97368aeae1

+ 1 - 1
README.md

@@ -107,7 +107,7 @@ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
 // 支持自动下拉刷新和缺省页的(可选)
 implementation 'com.github.liangjingkanji:BRV:1.3.12'
 
-implementation 'com.github.liangjingkanji:Net:2.2.19'
+implementation 'com.github.liangjingkanji:Net:2.2.20'
 ```
 
 <br>

+ 1 - 1
docs/api/net/com.drake.net.time/-interval/-init-.md

@@ -2,7 +2,7 @@
 
 # &lt;init&gt;
 
-`Interval(period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = period)``Interval(end: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, start: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = period)`
+`Interval(period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0)``Interval(end: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, start: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0)`
 
 轮循器
 

+ 7 - 1
docs/api/net/com.drake.net.time/-interval/count.md

@@ -2,4 +2,10 @@
 
 # count
 
-`var count: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
+`var count: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
+
+轮循器的计数
+
+### Property
+
+`count` - 轮循器的计数

+ 3 - 3
docs/api/net/com.drake.net.time/-interval/index.md

@@ -37,15 +37,15 @@
 
 | Name | Summary |
 |---|---|
-| [&lt;init&gt;](-init-.md) | `Interval(period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = period)`<br>轮循器`Interval(end: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, start: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = period)` |
+| [&lt;init&gt;](-init-.md) | `Interval(period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0)`<br>轮循器`Interval(end: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, period: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, unit: `[`TimeUnit`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html)`, start: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0, initialDelay: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 0)` |
 
 ### Properties
 
 | Name | Summary |
 |---|---|
-| [count](count.md) | `var count: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) |
+| [count](count.md) | 轮循器的计数`var count: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) |
 | [end](end.md) | 结束值`var end: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) |
-| [state](state.md) | `var state: `[`IntervalStatus`](../-interval-status/index.md) |
+| [state](state.md) | 轮循器当前状态`var state: `[`IntervalStatus`](../-interval-status/index.md) |
 
 ### Functions
 

+ 7 - 1
docs/api/net/com.drake.net.time/-interval/state.md

@@ -2,4 +2,10 @@
 
 # state
 
-`var state: `[`IntervalStatus`](../-interval-status/index.md)
+`var state: `[`IntervalStatus`](../-interval-status/index.md)
+
+轮循器当前状态
+
+### Property
+
+`state` - 轮循器当前状态

+ 1 - 1
docs/api/net/com.drake.net.transform/kotlinx.coroutines.-deferred/index.md

@@ -4,4 +4,4 @@
 
 | Name | Summary |
 |---|---|
-| [transform](transform.md) | `fun <T, R> Deferred<T>.transform(block: (T) -> R): `[`DeferredTransform`](../-deferred-transform/index.md)`<T, R>` |
+| [transform](transform.md) | 可以将[Deferred](#)返回结果进行转换 [block](transform.md#com.drake.net.transform$transform(kotlinx.coroutines.Deferred((com.drake.net.transform.transform.T)), kotlin.Function1((com.drake.net.transform.transform.T, com.drake.net.transform.transform.R)))/block)在[Deferred](#)执行成功返回结果时执行`fun <T, R> Deferred<T>.transform(block: (T) -> R): `[`DeferredTransform`](../-deferred-transform/index.md)`<T, R>` |

+ 5 - 1
docs/api/net/com.drake.net.transform/kotlinx.coroutines.-deferred/transform.md

@@ -2,4 +2,8 @@
 
 # transform
 
-`fun <T, R> Deferred<T>.transform(block: (T) -> R): `[`DeferredTransform`](../-deferred-transform/index.md)`<T, R>`
+`fun <T, R> Deferred<T>.transform(block: (T) -> R): `[`DeferredTransform`](../-deferred-transform/index.md)`<T, R>`
+
+可以将[Deferred](#)返回结果进行转换
+[block](transform.md#com.drake.net.transform$transform(kotlinx.coroutines.Deferred((com.drake.net.transform.transform.T)), kotlin.Function1((com.drake.net.transform.transform.T, com.drake.net.transform.transform.R)))/block)在[Deferred](#)执行成功返回结果时执行
+

+ 1 - 1
net/src/main/java/com/drake/net/time/Interval.kt

@@ -178,7 +178,7 @@ class Interval(
     fun life(
         lifecycleOwner: LifecycleOwner,
         lifeEvent: Lifecycle.Event = Lifecycle.Event.ON_STOP
-            ): Interval {
+    ): Interval {
         lifecycleOwner.lifecycle.addObserver(object : LifecycleEventObserver {
             override fun onStateChanged(source: LifecycleOwner, event: Lifecycle.Event) {
                 if (lifeEvent == event) scope?.cancel()