parkour.wrapper documentation

Wrapper

Protocol for working with mutable wrapper objects, such as Hadoop Writables.

auto-wrapper

macro

(auto-wrapper & cs)
Auto-generate `Wrapper` implementations for classes `cs`.

clone

(clone wobj)(clone conf wobj)
Return a clone of wrapper object `wobj`.

new-instance

(new-instance klass)(new-instance conf klass)
Return a new instance of the class of `klass`, or of `klass` itself if a
class.  If Hadoop `conf` is provided and `klass` is Configurable, configure the
new instance with `conf`.

rewrap

(rewrap wobj obj)
Mutate wapper `wobj` to wrap `obj`.

unwrap

(unwrap wobj)
Unwrap `wobj` in a type-specific fashion.

unwrap-all

(unwrap-all coll)
Unwrap all members of `coll` (usually key/value) to new vector.

wrap-keyvals

(wrap-keyvals k v)(wrap-keyvals conf k v)
Return a function which wraps its key/value pair argument in instances of the
wrapper types `k` & `v`.

wrap-vals

(wrap-vals t)(wrap-vals conf t)
Return a function which wraps its argument in an instance of the wrapper type
`t`.