IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
DelegateDoubleFunction.cs
Go to the documentation of this file.
1using System;
2
3namespace java.util.function
4{
5
10 public class DelegateDoubleFunction<TResult> : DoubleFunction
11 {
12
13 readonly Func<double, TResult> _func;
14
20 public DelegateDoubleFunction(Func<double, TResult> func)
21 {
22 _func = func ?? throw new ArgumentNullException(nameof(func));
23 }
24
25 public object? apply(double t)
26 {
27 return _func(t);
28 }
29
30 }
31
32}
Implementation of DoubleFunction that forwards to a Func<Double, TResult>.
DelegateDoubleFunction(Func< double, TResult > func)
Initializes a new instance.