| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.util.IntsRef
public final class IntsRef
Represents int[], as a slice (offset + length) into an
  existing int[].  The ints member should never be null; use
  EMPTY_INTS if necessary.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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.  | 
|
| Method Summary | |
|---|---|
 IntsRef | 
clone()
 | 
 int | 
compareTo(IntsRef other)
Signed int order comparison  | 
 void | 
copyInts(IntsRef other)
 | 
static IntsRef | 
deepCopyOf(IntsRef other)
Creates a new IntsRef that points to a copy of the ints from other | 
 boolean | 
equals(Object other)
 | 
 void | 
grow(int newLength)
Used to grow the reference array.  | 
 int | 
hashCode()
 | 
 boolean | 
intsEquals(IntsRef other)
 | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int[] EMPTY_INTS
public int[] ints
null.
public int offset
public int length
| Constructor Detail | 
|---|
public IntsRef()
EMPTY_INTS
public IntsRef(int capacity)
capacity.
 Offset and length will both be zero.
public IntsRef(int[] ints,
               int offset,
               int length)
| Method Detail | 
|---|
public IntsRef clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic boolean intsEquals(IntsRef other)
public int compareTo(IntsRef other)
compareTo in interface Comparable<IntsRef>public void copyInts(IntsRef other)
public void grow(int newLength)
public String toString()
toString in class Objectpublic static IntsRef deepCopyOf(IntsRef other)
other
 The returned IntsRef will have a length of other.length and an offset of zero.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||