IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
ListWrapper.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4namespace java.util
5{
6
7 class ListWrapper<T> : CollectionWrapper<T>, IList<T>
8 {
9
10 readonly List _list;
11
17 public ListWrapper(List list) :
18 base(list)
19 {
20 _list = list ?? throw new ArgumentNullException(nameof(list));
21 }
22
24 public T this[int index]
25 {
26 get => (T)_list.get(index);
27 set => _list.set(index, value);
28 }
29
31 public int IndexOf(T item) => _list.indexOf(item);
32
34 public void Insert(int index, T item) => _list.add(index, item);
35
37 public void RemoveAt(int index) => _list.remove(index);
38
39 }
40
41}
ListWrapper(List list)
Initializes a new instance.
void RemoveAt(int index)
void Insert(int index, T item)