-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Killing UncheckedScalar as there is no checked exceptions in Kotlin
- Loading branch information
Showing
16 changed files
with
32 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
kactoos-jvm/src/main/kotlin/nnl/rocks/kactoos/iterable/IterableEnvelope.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
package nnl.rocks.kactoos.iterable | ||
|
||
import nnl.rocks.kactoos.Scalar | ||
import nnl.rocks.kactoos.scalar.UncheckedScalar | ||
import nnl.rocks.kactoos.scalar.Constant | ||
|
||
/** | ||
* Iterable envelope. | ||
* | ||
* | ||
* There is no thread-safety guarantee. | ||
* | ||
* | ||
* | ||
* @param X Type of item | ||
* @since 0.24 | ||
*/ | ||
open class IterableEnvelope<out X : Any>( | ||
private val iterable: UncheckedScalar<Iterable<X>> | ||
private val iterable: Scalar<Iterable<X>> | ||
) : Iterable<X> by iterable() { | ||
|
||
constructor(scalar: Scalar<Iterable<X>>) : this(UncheckedScalar(scalar)) | ||
constructor(iterable: Iterable<X>) : this(Constant { iterable }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
kactoos-jvm/src/main/kotlin/nnl/rocks/kactoos/list/ListEnvelope.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package nnl.rocks.kactoos.list | ||
|
||
import nnl.rocks.kactoos.Scalar | ||
import nnl.rocks.kactoos.scalar.UncheckedScalar | ||
import nnl.rocks.kactoos.scalar.Constant | ||
|
||
/** | ||
* List envelope. | ||
* | ||
* There is no thread-safety guarantee. | ||
* | ||
* @param T Element type | ||
* @since 0.23 | ||
* @since 0.3 | ||
*/ | ||
open class ListEnvelope<T : Any>( | ||
private val list: UncheckedScalar<List<T>> | ||
private val list: Scalar<List<T>> | ||
) : List<T> by list() { | ||
|
||
constructor(src: Scalar<List<T>>) : this(UncheckedScalar(src)) | ||
constructor(list: List<T>) : this(Constant { list }) | ||
} |
12 changes: 4 additions & 8 deletions
12
kactoos-jvm/src/main/kotlin/nnl/rocks/kactoos/map/MapEnvelope.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
package nnl.rocks.kactoos.map | ||
|
||
import nnl.rocks.kactoos.Scalar | ||
import nnl.rocks.kactoos.scalar.UncheckedScalar | ||
import nnl.rocks.kactoos.scalar.Constant | ||
|
||
/** | ||
* Map envelope. | ||
* | ||
* There is no thread-safety guarantee. | ||
* | ||
* | ||
* | ||
* @param X Type of key | ||
* @param Y Type of value | ||
* @see StickyMap | ||
* | ||
* @since 0.24 | ||
* @since 0.3 | ||
*/ | ||
open class MapEnvelope<X, out Y>(private val map: UncheckedScalar<Map<X, Y>>) : Map<X, Y> by map() { | ||
open class MapEnvelope<X, out Y>(private val map: Scalar<Map<X, Y>>) : Map<X, Y> by map() { | ||
|
||
constructor(scalar: Scalar<Map<X, Y>>) : this( | ||
UncheckedScalar(scalar) | ||
) | ||
constructor(map: Map<X, Y>) : this(Constant { map }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters