Minor: put type parameters before function name

This commit is contained in:
Nikolay Krasko
2015-11-16 18:45:52 +03:00
parent d635f6f399
commit 24e473f47b
@@ -27,17 +27,17 @@ public interface StorageManager {
* NOTE: if compute() has side-effects the WEAK reference kind is dangerous: the side-effects will be repeated if
* the value gets collected and then re-computed
*/
public fun createMemoizedFunction<K, V : Any>(compute: (K) -> V): MemoizedFunctionToNotNull<K, V>
public fun <K, V : Any> createMemoizedFunction(compute: (K) -> V): MemoizedFunctionToNotNull<K, V>
public fun createMemoizedFunctionWithNullableValues<K, V : Any>(compute: (K) -> V?): MemoizedFunctionToNullable<K, V>
public fun <K, V : Any> createMemoizedFunctionWithNullableValues(compute: (K) -> V?): MemoizedFunctionToNullable<K, V>
public fun createMemoizedFunction<K, V : Any>(compute: (K) -> V, map: ConcurrentMap<K, Any>): MemoizedFunctionToNotNull<K, V>
public fun <K, V : Any> createMemoizedFunction(compute: (K) -> V, map: ConcurrentMap<K, Any>): MemoizedFunctionToNotNull<K, V>
public fun createMemoizedFunctionWithNullableValues<K, V : Any>(compute: (K) -> V, map: ConcurrentMap<K, Any>): MemoizedFunctionToNullable<K, V>
public fun <K, V : Any> createMemoizedFunctionWithNullableValues(compute: (K) -> V, map: ConcurrentMap<K, Any>): MemoizedFunctionToNullable<K, V>
public fun createLazyValue<T : Any>(computable: () -> T): NotNullLazyValue<T>
public fun <T : Any> createLazyValue(computable: () -> T): NotNullLazyValue<T>
public fun createRecursionTolerantLazyValue<T : Any>(computable: () -> T, onRecursiveCall: T): NotNullLazyValue<T>
public fun <T : Any> createRecursionTolerantLazyValue(computable: () -> T, onRecursiveCall: T): NotNullLazyValue<T>
/**
* @param onRecursiveCall is called if the computation calls itself recursively.
@@ -46,17 +46,17 @@ public interface StorageManager {
* otherwise it's executed and its result is returned
* @param postCompute is called after the value is computed, but before any other thread sees it
*/
public fun createLazyValueWithPostCompute<T : Any>(computable: () -> T, onRecursiveCall: ((Boolean) -> T)?, postCompute: (T) -> Unit): NotNullLazyValue<T>
public fun <T : Any> createLazyValueWithPostCompute(computable: () -> T, onRecursiveCall: ((Boolean) -> T)?, postCompute: (T) -> Unit): NotNullLazyValue<T>
public fun createNullableLazyValue<T : Any>(computable: () -> T?): NullableLazyValue<T>
public fun <T : Any> createNullableLazyValue(computable: () -> T?): NullableLazyValue<T>
public fun createRecursionTolerantNullableLazyValue<T : Any>(computable: () -> T?, onRecursiveCall: T?): NullableLazyValue<T>
public fun <T : Any> createRecursionTolerantNullableLazyValue(computable: () -> T?, onRecursiveCall: T?): NullableLazyValue<T>
/**
* {@code postCompute} is called after the value is computed, but before any other thread sees it (the current thread may
* see it in between)
*/
public fun createNullableLazyValueWithPostCompute<T : Any>(computable: () -> T?, postCompute: (T?) -> Unit): NullableLazyValue<T>
public fun <T : Any> createNullableLazyValueWithPostCompute(computable: () -> T?, postCompute: (T?) -> Unit): NullableLazyValue<T>
public fun compute<T>(computable: () -> T): T
public fun <T> compute(computable: () -> T): T
}