Package dev.fritz2.identification

Types

Inspector
Link copied to clipboard
common
interface Inspector<T>
represents the data and corresponding id of certain value in a deep nested model structure.
RootInspector
Link copied to clipboard
common
class RootInspector<T>(data: T, id: String) : Inspector<T>
RootInspector is the starting point for getting your data and corresponding ids from your deep nested model structure.
SubInspector
Link copied to clipboard
common
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.

Functions

inspect
Link copied to clipboard
common
fun <T> inspect(data: T, id: String = ""): RootInspector<T>
gives you the a new RootInspector as starting point.
sub
Link copied to clipboard
common
inline fun <X> RootInspector<List<X>>.sub(index: Int): SubInspector<List<X>, List<X>, X>
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.
inline fun <T, I> RootInspector<List<T>>.sub(element: T, noinline idProvider: IdProvider<T, I>): SubInspector<List<T>, List<T>, T>
creates a Inspector for an element in your Inspector's list.
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.
uniqueId
Link copied to clipboard
common
fun uniqueId(): String
creates something like an UUID
js
fun uniqueId(): String
create a unique id quite similar (but not really) to a UUID
fun uniqueId(): String
creates a real UUID on the jvm