public final class IntsRef extends Object implements Comparable<IntsRef>, 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() |
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() |
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 boolean intsEquals(IntsRef other)
public int compareTo(IntsRef other)
compareTo in interface Comparable<IntsRef>public void copyInts(IntsRef other)
public void grow(int newLength)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.