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