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