ByName

nl.grons.metrics4.scala.ByName
See theByName companion object
final class ByName[+T](expression: => T) extends () => T

Provides a wrapper for by-name expressions with the intent that they can become eligible for implicit conversions and implicit resolution.

Type parameters

T

Result type of the evaluated expression

Value parameters

expression

A by-name parameter that will yield a result of type T when evaluated

Attributes

Companion
object
Graph
Supertypes
trait () => T
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(): T

Evaluates the given expression every time without memoizing the result.

Evaluates the given expression every time without memoizing the result.

Attributes

Returns

Result of type T when evaluating the provided expression.

def map[U](fn: T => U): ByName[U]

Lazily maps the given expression of type T to type U.

Lazily maps the given expression of type T to type U.

Attributes

Inherited methods

override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function0 -> Any
Inherited from:
Function0