value · System

ListIterator<T>

public value ListIterator<T>

The items of a list, in order.

Tipo
value
Espacio de nombres
System
Ensamblado
System.Core
Acceso
public
Archivo fuente
List.ant

Parámetros de tipo

NombreRestricciones
Tcualquier tipo

Constructores

new(T[] items, i32 count)
#

Propiedades

T Current { get; }
#

read-only

Métodos

Next() : bool
#

Miembros privados e internos (3)

T[] items
#

private

i32 count
#

private

i32 index
#

private

Código fuente

ListIterator<T> en Antril, descompilado a partir de su Larva HIR.

System.ListIterator.ant
// System.ListIterator — System.Core (decompiled from Larva HIR)

into namespace System
{
	/// The items of a list, in order.
	public value ListIterator<T>
	{
		T[] items;
		i32 count;
		i32 index;

		public:
			new(T[] items, i32 count)
			{
				this.items = items;
				this.count = count;
				index = -1;
			}

			Next() : bool
			{
				index++;
				return index < count;
			}

			T Current
			{
				get => items[index];
			}
	}
}
Esc