Implicits

nl.grons.metrics4.scala.Implicits
object Implicits

Implicit conversions of Scala functions to Metric interfaces.

NOTE: no longer needed in Scala 2.12 and later due to due to SAM.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Implicits.type

Members list

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 parameters

f

the function to convert

Attributes

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 parameters

M

the metric type

Value parameters

f

the function to convert

Attributes

Returns

a MetricSupplier