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