Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Int32sRef

    Represents int[], as a slice (offset + length) into an existing int[]. The Int32s member should never be null; use EMPTY_INT32S if necessary.

    NOTE: This was IntsRef in Lucene

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    Int32sRef
    Implements
    System.IComparable<Int32sRef>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    [Serializable]
    public sealed class Int32sRef : IComparable<Int32sRef>

    Constructors

    | Improve this Doc View Source

    Int32sRef()

    Create a Int32sRef with EMPTY_INT32S.

    Declaration
    public Int32sRef()
    | Improve this Doc View Source

    Int32sRef(Int32)

    Create a Int32sRef pointing to a new array of size capacity. Offset and length will both be zero.

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

    Int32sRef(Int32[], Int32, Int32)

    This instance will directly reference ints w/o making a copy. ints should not be null.

    Declaration
    public Int32sRef(int[] ints, int offset, int length)
    Parameters
    Type Name Description
    System.Int32[] ints
    System.Int32 offset
    System.Int32 length

    Fields

    | Improve this Doc View Source

    EMPTY_INT32S

    An empty integer array for convenience.

    NOTE: This was EMPTY_INTS in Lucene

    Declaration
    public static readonly int[] EMPTY_INT32S
    Field Value
    Type Description
    System.Int32[]

    Properties

    | Improve this Doc View Source

    Int32s

    The contents of the Int32sRef. Should never be null.

    NOTE: This was ints (field) in Lucene

    Declaration
    public int[] Int32s { get; set; }
    Property Value
    Type Description
    System.Int32[]
    | Improve this Doc View Source

    Length

    Length of used System.Int32s.

    Declaration
    public int Length { get; set; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Offset

    Offset of first valid integer.

    Declaration
    public int Offset { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Clone()

    Returns a shallow clone of this instance (the underlying System.Int32s are not copied and will be shared by both the returned object and this object.

    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object
    See Also
    DeepCopyOf(Int32sRef)
    | Improve this Doc View Source

    CompareTo(Int32sRef)

    Signed System.Int32 order comparison.

    Declaration
    public int CompareTo(Int32sRef other)
    Parameters
    Type Name Description
    Int32sRef other
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    CopyInt32s(Int32sRef)

    NOTE: This was copyInts() in Lucene

    Declaration
    public void CopyInt32s(Int32sRef other)
    Parameters
    Type Name Description
    Int32sRef other
    | Improve this Doc View Source

    DeepCopyOf(Int32sRef)

    Creates a new Int32sRef that points to a copy of the System.Int32s from other

    The returned Int32sRef will have a length of other.Length and an offset of zero.

    Declaration
    public static Int32sRef DeepCopyOf(Int32sRef other)
    Parameters
    Type Name Description
    Int32sRef other
    Returns
    Type Description
    Int32sRef
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    Grow(Int32)

    Used to grow the reference array.

    In general this should not be used as it does not take the offset into account.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public void Grow(int newLength)
    Parameters
    Type Name Description
    System.Int32 newLength
    | Improve this Doc View Source

    Int32sEquals(Int32sRef)

    NOTE: This was intsEquals() in Lucene

    Declaration
    public bool Int32sEquals(Int32sRef other)
    Parameters
    Type Name Description
    Int32sRef other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsValid()

    Performs internal consistency checks. Always returns true (or throws System.InvalidOperationException)

    Declaration
    public bool IsValid()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Implements

    System.IComparable<T>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.