SubInspector

class SubInspector<R, P, T>(parent: Inspector<P>, lens: Lens<P, T>, rootModelId: RootInspector<R>, rootLens: Lens<R, T>) : Inspector<T>

SubInspector is the next lower Inspector in a deep nested model structure. It's generated by calling the sub function on an Inspector.

Constructors

SubInspector
Link copied to clipboard
common
fun <R, P, T> SubInspector(parent: Inspector<P>, lens: Lens<P, T>, rootModelId: RootInspector<R>, rootLens: Lens<R, T>)

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
sub
Link copied to clipboard
common
open override fun <X> sub(lens: Lens<T, X>): SubInspector<R, T, X>
creates a new Inspector for a part of your underlying data-model
toString
Link copied to clipboard
common
open fun toString(): String

Properties

data
Link copied to clipboard
common
open override val data: T
returns the underlying data
id
Link copied to clipboard
common
open override val id: String
generates the corresponding id
rootLens
Link copied to clipboard
common
val rootLens: Lens<R, T>
rootModelId
Link copied to clipboard
common
val rootModelId: RootInspector<R>

Extensions

inspectEach
Link copied to clipboard
common
inline fun <R, P, T, I> SubInspector<R, P, List<T>>.inspectEach(noinline idProvider: IdProvider<T, I>, action: (SubInspector<R, List<T>, T>) -> Unit)
Performs the given action on each SubInspector.
inline fun <R, P, X> SubInspector<R, P, List<X>>.inspectEach(action: (SubInspector<R, List<X>, X>) -> Unit)
Performs the given action on each SubInspector.
sub
Link copied to clipboard
common
inline fun <R, P, T, I> SubInspector<R, P, List<T>>.sub(element: T, noinline idProvider: IdProvider<T, I>): SubInspector<R, List<T>, T>
creates a Inspector for an element in your Inspector's list.
inline fun <R, P, X> SubInspector<R, P, List<X>>.sub(index: Int): SubInspector<R, List<X>, X>
creates a Inspector for an element in your Inspector's list.