Class FixedList4096Extensions | Collections | 0.12.0-preview.13
docs.unity3d.com
    Show / Hide Table of Contents

    Class FixedList4096Extensions

    Inheritance
    Object
    FixedList4096Extensions
    Namespace: Unity.Collections
    Syntax
    public static class FixedList4096Extensions

    Methods

    Contains<T, U>(FixedList4096<T>, U)

    Determines whether an element is in the FixedList4096<T>.

    Declaration
    public static bool Contains<T, U>(this FixedList4096<T> list, U value)
        where T : struct, IEquatable<U>
    Parameters
    Type Name Description
    FixedList4096<T> list

    List to perform search.

    U value

    The value to locate.

    Returns
    Type Description
    Boolean

    True, if element is found.

    Type Parameters
    Name Description
    T

    The type of values in the list.

    U

    The value type.

    IndexOf<T, U>(FixedList4096<T>, U)

    Searches for the specified element in FixedList4096<T>.

    Declaration
    public static int IndexOf<T, U>(this FixedList4096<T> list, U value)
        where T : struct, IEquatable<U>
    Parameters
    Type Name Description
    FixedList4096<T> list

    List to perform search.

    U value

    The value to locate.

    Returns
    Type Description
    Int32

    The zero-based index of the first occurrence element if found, otherwise returns -1.

    Type Parameters
    Name Description
    T

    The type of values in the list.

    U

    The value type.

    Remove<T, U>(FixedList4096<T>, U)

    Searches for the specified item from the begining of the FixedList4096 forward, removes it if possible, and returns true if the item was successfully removed.

    Declaration
    public static bool Remove<T, U>(this FixedList4096<T> list, U value)
        where T : struct, IEquatable<U>
    Parameters
    Type Name Description
    FixedList4096<T> list
    U value
    Returns
    Type Description
    Boolean

    True, if element is removed.

    Type Parameters
    Name Description
    T
    U

    RemoveSwapBack<T, U>(FixedList4096<T>, U)

    Removes the first occurrence of an item from the FixedList4096<T> and replaces it with the last element, which can be much faster than copying down all subsequent elements.

    Declaration
    public static bool RemoveSwapBack<T, U>(this FixedList4096<T> list, U value)
        where T : struct, IEquatable<U>
    Parameters
    Type Name Description
    FixedList4096<T> list
    U value
    Returns
    Type Description
    Boolean

    Returns true if item is removed.

    Type Parameters
    Name Description
    T
    U
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023