docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Piece

    An element of a template. It can be either a Sequence or a SpecialToken.

    Inheritance
    object
    Piece
    Sequence
    SpecialToken
    Implements
    IEquatable<Piece>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.InferenceEngine.Tokenization.PostProcessors.Templating
    Assembly: Unity.InferenceEngine.Tokenization.dll
    Syntax
    public abstract class Piece : IEquatable<Piece>

    Constructors

    Piece(int)

    Initializes a new instance of the Piece type.

    Declaration
    protected Piece(int sequenceId)
    Parameters
    Type Name Description
    int sequenceId

    The ID of the sequence this piece belongs to.

    Properties

    SequenceId

    The type id of the sequence.

    Declaration
    public int SequenceId { get; }
    Property Value
    Type Description
    int

    Methods

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)

    Equals(Piece)

    Declaration
    public bool Equals(Piece other)
    Parameters
    Type Name Description
    Piece other
    Returns
    Type Description
    bool

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    GetPieceHashCode()

    Gets the hash code of this Piece.

    Declaration
    protected abstract int GetPieceHashCode()
    Returns
    Type Description
    int

    The hash code of this Piece.

    PieceEquals(Piece)

    Tell whether this Piece equals the other one.

    Declaration
    protected abstract bool PieceEquals(Piece other)
    Parameters
    Type Name Description
    Piece other

    The other Piece to compare.

    Returns
    Type Description
    bool

    Whether this Piece equals the other one.

    ToString()

    Declaration
    public override abstract string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)