public final class LongsRef extends java.lang.Object implements java.lang.Comparable<LongsRef>, java.lang.Cloneable
longs
member should never be null; use
EMPTY_LONGS
if necessary.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
LongsRef |
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.
|
int |
compareTo(LongsRef other)
Signed int order comparison
|
static LongsRef |
deepCopyOf(LongsRef other)
Creates a new LongsRef that points to a copy of the longs from
other |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
isValid()
Performs internal consistency checks.
|
boolean |
longsEquals(LongsRef other) |
java.lang.String |
toString() |
public static final long[] EMPTY_LONGS
public long[] longs
null
.public int offset
public int length
public LongsRef()
EMPTY_LONGS
public LongsRef(int capacity)
capacity
.
Offset and length will both be zero.public LongsRef(long[] longs, int offset, int length)
public LongsRef clone()
clone
in class java.lang.Object
deepCopyOf(org.apache.lucene.util.LongsRef)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean longsEquals(LongsRef other)
public int compareTo(LongsRef other)
compareTo
in interface java.lang.Comparable<LongsRef>
public java.lang.String toString()
toString
in class java.lang.Object
public static LongsRef deepCopyOf(LongsRef other)
other
The returned IntsRef will have a length of other.length and an offset of zero.
public boolean isValid()
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.