IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IterableExtensions.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
System.Linq;
4
5
using
java.util
;
6
7
namespace
java.lang
8
{
9
13
public
static
class
IterableExtensions
14
{
15
22
public
static
IEnumerable<T>
AsEnumerable<T>
(
this
Iterable iterable) => iterable
switch
23
{
24
IEnumerable<T> i => i,
25
IEnumerable i => i.Cast<T>(),
26
Collection i => i.AsCollection<T>(),
27
Iterable i =>
new
IterableWrapper<T>
(i),
28
};
29
30
}
31
32
}
java.lang.IterableExtensions
Provides extension methods for working against Java Iterable instances.
Definition
IterableExtensions.cs:14
java.lang.IterableExtensions.AsEnumerable< T >
static IEnumerable< T > AsEnumerable< T >(this Iterable iterable)
Returns the appropriate wrapper type for the given Iterable.
java.lang.IterableWrapper
Wraps an Iterable as a IEnumerable.
Definition
IterableWrapper.cs:14
java.lang
Definition
IterableExtensions.cs:8
java.util
Definition
CollectionExtensions.cs:4
src
IKVM.Java.Extensions
java
lang
IterableExtensions.cs
Generated by
1.12.0