|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.util.LongsRef
public final class LongsRef
Represents long[], as a slice (offset + length) into an
existing long[]. The longs member should never be null; use
EMPTY_LONGS if necessary.
| Field Summary | |
|---|---|
static long[] |
EMPTY_LONGS
An empty long array for convenience |
int |
length
Length of used longs. |
long[] |
longs
The contents of the LongsRef. |
int |
offset
Offset of first valid long. |
| Constructor Summary | |
|---|---|
LongsRef()
Create a LongsRef with EMPTY_LONGS |
|
LongsRef(int capacity)
Create a LongsRef pointing to a new array of size capacity. |
|
LongsRef(long[] longs,
int offset,
int length)
This instance will directly reference longs w/o making a copy. |
|
| Method Summary | |
|---|---|
LongsRef |
clone()
|
int |
compareTo(LongsRef other)
Signed int order comparison |
void |
copyLongs(LongsRef other)
|
static LongsRef |
deepCopyOf(LongsRef other)
Creates a new IntsRef that points to a copy of the longs from other |
boolean |
equals(Object other)
|
void |
grow(int newLength)
Used to grow the reference array. |
int |
hashCode()
|
boolean |
isValid()
Performs internal consistency checks. |
boolean |
longsEquals(LongsRef other)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long[] EMPTY_LONGS
public long[] longs
null.
public int offset
public int length
| Constructor Detail |
|---|
public LongsRef()
EMPTY_LONGS
public LongsRef(int capacity)
capacity.
Offset and length will both be zero.
public LongsRef(long[] longs,
int offset,
int length)
| Method Detail |
|---|
public LongsRef clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic boolean longsEquals(LongsRef other)
public int compareTo(LongsRef other)
compareTo in interface Comparable<LongsRef>public void copyLongs(LongsRef other)
public void grow(int newLength)
public String toString()
toString in class Objectpublic static LongsRef deepCopyOf(LongsRef other)
other
The returned IntsRef will have a length of other.length and an offset of zero.
public boolean isValid()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||