public final class IntsRef extends java.lang.Object implements java.lang.Comparable<IntsRef>, java.lang.Cloneable
ints member should never be null; use
EMPTY_INTS if necessary.| Modifier and Type | Field and Description |
|---|---|
static int[] |
EMPTY_INTS
An empty integer array for convenience
|
int[] |
ints
The contents of the IntsRef.
|
int |
length
Length of used ints.
|
int |
offset
Offset of first valid integer.
|
| Constructor and Description |
|---|
IntsRef()
Create a IntsRef with
EMPTY_INTS |
IntsRef(int capacity)
Create a IntsRef pointing to a new array of size
capacity. |
IntsRef(int[] ints,
int offset,
int length)
This instance will directly reference ints w/o making a copy.
|
| Modifier and Type | Method and Description |
|---|---|
IntsRef |
clone()
Returns a shallow clone of this instance (the underlying ints are
not copied and will be shared by both the returned object and this
object.
|
int |
compareTo(IntsRef other)
Signed int order comparison
|
static IntsRef |
deepCopyOf(IntsRef other)
Creates a new IntsRef that points to a copy of the ints from
other |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
intsEquals(IntsRef other) |
boolean |
isValid()
Performs internal consistency checks.
|
java.lang.String |
toString() |
public static final int[] EMPTY_INTS
public int[] ints
null.public int offset
public int length
public IntsRef()
EMPTY_INTSpublic IntsRef(int capacity)
capacity.
Offset and length will both be zero.public IntsRef(int[] ints,
int offset,
int length)
public IntsRef clone()
clone in class java.lang.ObjectdeepCopyOf(org.apache.lucene.util.IntsRef)public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic boolean intsEquals(IntsRef other)
public int compareTo(IntsRef other)
compareTo in interface java.lang.Comparable<IntsRef>public java.lang.String toString()
toString in class java.lang.Objectpublic static IntsRef deepCopyOf(IntsRef other)
other
The returned IntsRef will have a length of other.length and an offset of zero.
public boolean isValid()
Copyright © 2000–2025 The Apache Software Foundation. All rights reserved.