Class Int64sRef
Represents long[], as a slice (offset + length) into an
existing long[]. The Int64s member should never be null; use
EMPTY_INT64S if necessary.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Implements
Inherited Members
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
[Serializable]
public sealed class Int64sRef : IComparable<Int64sRef>
Constructors
Int64sRef()
Create a Int64sRef with EMPTY_INT64S
Declaration
public Int64sRef()
Int64sRef(int)
Create a Int64sRef pointing to a new array of size capacity.
Offset and length will both be zero.
Declaration
public Int64sRef(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| int | capacity |
Int64sRef(long[], int, int)
This instance will directly reference longs w/o making a copy.
longs should not be null.
Declaration
public Int64sRef(long[] longs, int offset, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| long[] | longs | |
| int | offset | |
| int | length |
Fields
EMPTY_INT64S
An empty long array for convenience
NOTE: This was EMPTY_LONGS in LuceneDeclaration
public static readonly long[] EMPTY_INT64S
Field Value
| Type | Description |
|---|---|
| long[] |
Properties
Int64s
The contents of the Int64sRef. Should never be null.
Declaration
public long[] Int64s { get; set; }
Property Value
| Type | Description |
|---|---|
| long[] |
Length
Length of used longs.
Declaration
public int Length { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Offset
Offset of first valid long.
Declaration
public int Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Clone()
Returns a shallow clone of this instance (the underlying longs are not copied and will be shared by both the returned object and this object.
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object |
See Also
CompareTo(Int64sRef)
Signed int order comparison
Declaration
public int CompareTo(Int64sRef other)
Parameters
| Type | Name | Description |
|---|---|---|
| Int64sRef | other |
Returns
| Type | Description |
|---|---|
| int |
CopyInt64s(Int64sRef)
NOTE: This was copyLongs() in Lucene
Declaration
public void CopyInt64s(Int64sRef other)
Parameters
| Type | Name | Description |
|---|---|---|
| Int64sRef | other |
DeepCopyOf(Int64sRef)
Creates a new Int64sRef that points to a copy of the longs from
other.
other.Length
and an offset of zero.
Declaration
public static Int64sRef DeepCopyOf(Int64sRef other)
Parameters
| Type | Name | Description |
|---|---|---|
| Int64sRef | other |
Returns
| Type | Description |
|---|---|
| Int64sRef |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
Grow(int)
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 |
|---|---|---|
| int | newLength |
Int64sEquals(Int64sRef)
NOTE: This was longsEquals() in Lucene
Declaration
public bool Int64sEquals(Int64sRef other)
Parameters
| Type | Name | Description |
|---|---|---|
| Int64sRef | other |
Returns
| Type | Description |
|---|---|
| bool |
IsValid()
Performs internal consistency checks.
Always returns true (or throws InvalidOperationException)
Declaration
public bool IsValid()
Returns
| Type | Description |
|---|---|
| bool |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |