Package org.apache.lucene.util
Class IntsRef
- java.lang.Object
-
- org.apache.lucene.util.IntsRef
-
- All Implemented Interfaces:
Cloneable
,Comparable<IntsRef>
public final class IntsRef extends Object implements Comparable<IntsRef>, Cloneable
Represents int[], as a slice (offset + length) into an existing int[].- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static int[]
EMPTY_INTS
int[]
ints
int
length
int
offset
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntsRef
clone()
int
compareTo(IntsRef other)
Signed int order comparisonvoid
copyInts(IntsRef other)
static IntsRef
deepCopyOf(IntsRef other)
Creates a new IntsRef that points to a copy of the ints fromother
boolean
equals(Object other)
void
grow(int newLength)
Used to grow the reference array.int
hashCode()
boolean
intsEquals(IntsRef other)
String
toString()
-
-
-
Method Detail
-
intsEquals
public boolean intsEquals(IntsRef other)
-
compareTo
public int compareTo(IntsRef other)
Signed int order comparison- Specified by:
compareTo
in interfaceComparable<IntsRef>
-
copyInts
public void copyInts(IntsRef other)
-
grow
public void grow(int newLength)
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.
-
-