Implicits

object Implicits

Implicit conversions of Scala functions to Metric interfaces.

NOTE: no longer needed in Scala 2.12 and later.

class Object
trait Matchable
class Any

Implicits

Implicits

implicit
def functionToMetricFilter(f: (String, Metric) => Boolean): MetricFilter

Creates a MetricFilter from a regular Scala function that accepts a name and a metric and returns a boolean: (String, Metric) => Boolean.

Creates a MetricFilter from a regular Scala function that accepts a name and a metric and returns a boolean: (String, Metric) => Boolean.

Value Params
f

the function to convert

Returns

a MetricFilter

implicit
def functionToMetricSupplier[M <: Metric](f: () => M): MetricSupplier[M]

Creates a MetricSupplier from a regular Scala function that returns a Metric: () => Metric.

Creates a MetricSupplier from a regular Scala function that returns a Metric: () => Metric.

Type Params
M

the metric type

Value Params
f

the function to convert

Returns

a MetricSupplier