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