Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    FastListStruct<T> Struct

    Namespace: Stride.Core.Collections
    Assembly: Stride.Core.dll

    public struct FastListStruct<T> : IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T
    Name Description
    Constructors
    FastListStruct(T[])
    FastListStruct(FastList<T>)
    FastListStruct(Int32)
    Fields
    Count
    Items

    Gets the items.

    Properties
    Item[Int32]
    Methods
    Add(T)
    AddRange(FastListStruct<T>)
    Clear()
    Contains(T)
    EnsureCapacity(Int32)
    GetEnumerator()
    IndexOf(T)
    Insert(Int32, T)
    Remove(T)
    RemoveAt(Int32)
    SwapRemoveAt(Int32)

    Remove an item by swapping it with the last item and removing it from the last position. This function prevents to shift values from the list on removal but does not maintain order.

    ToArray()
    Operators
    Implicit(T[] to FastListStruct<T>)
    Implicit(FastList<T> to FastListStruct<T>)
    Explicit Interface Implementations
    IEnumerable<T>.GetEnumerator()
    IEnumerable.GetEnumerator()
    | Improve this Doc View Source

    Constructors


    FastListStruct(T[])

    public FastListStruct(T[] array)
    Parameters
    Type Name Description
    T[] array

    FastListStruct(FastList<T>)

    public FastListStruct(FastList<T> fastList)
    Parameters
    Type Name Description
    FastList<T> fastList

    FastListStruct(Int32)

    public FastListStruct(int capacity)
    Parameters
    Type Name Description
    System.Int32 capacity
    | Improve this Doc View Source

    Fields


    Count

    public int Count
    Field Value
    Type Description
    System.Int32

    Items

    Gets the items.

    public T[] Items
    Field Value
    Type Description
    T[]
    | Improve this Doc View Source

    Properties


    Item[Int32]

    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    T
    | Improve this Doc View Source

    Methods


    Add(T)

    public void Add(T item)
    Parameters
    Type Name Description
    T item

    AddRange(FastListStruct<T>)

    public void AddRange(FastListStruct<T> items)
    Parameters
    Type Name Description
    FastListStruct<T> items

    Clear()

    public void Clear()

    Contains(T)

    public bool Contains(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean

    EnsureCapacity(Int32)

    public void EnsureCapacity(int newCapacity)
    Parameters
    Type Name Description
    System.Int32 newCapacity

    GetEnumerator()

    public FastListStruct<T>.Enumerator GetEnumerator()
    Returns
    Type Description
    FastListStruct.Enumerator<>

    IndexOf(T)

    public int IndexOf(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Int32

    Insert(Int32, T)

    public void Insert(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index
    T item

    Remove(T)

    public bool Remove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean

    RemoveAt(Int32)

    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    SwapRemoveAt(Int32)

    Remove an item by swapping it with the last item and removing it from the last position. This function prevents to shift values from the list on removal but does not maintain order.

    public void SwapRemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the item to remove.


    ToArray()

    public T[] ToArray()
    Returns
    Type Description
    T[]
    | Improve this Doc View Source

    Operators


    Implicit(T[] to FastListStruct<T>)

    public static implicit operator FastListStruct<T>(T[] array)
    Parameters
    Type Name Description
    T[] array
    Returns
    Type Description
    FastListStruct<T>

    Implicit(FastList<T> to FastListStruct<T>)

    public static implicit operator FastListStruct<T>(FastList<T> fastList)
    Parameters
    Type Name Description
    FastList<T> fastList
    Returns
    Type Description
    FastListStruct<T>
    | Improve this Doc View Source

    Explicit Interface Implementations


    IEnumerable<T>.GetEnumerator()

    IEnumerator<T> IEnumerable<T>.GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    IEnumerable.GetEnumerator()

    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Inherited Members

    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    EnumerableExtensions.IsNullOrEmpty(IEnumerable)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    EnumerableExtensions.LastIndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation