public final class IntsRef extends Object implements Comparable<IntsRef>
Modifier and Type | Field and Description |
---|---|
static IntsRef |
EMPTY
An IntsRef with an array of size 0.
|
int[] |
ints
The contents of the IntsRef.
|
int |
length
Length of used ints.
|
int |
offset
Offset of first valid integer.
|
Constructor and Description |
---|
IntsRef(int capacity)
Create a IntsRef pointing to a new int array of size
capacity leading to capacity*32 bits. |
IntsRef(int[] ints,
int offset,
int length)
This instance will directly reference ints w/o making a copy.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IntsRef other)
Signed int order comparison
|
static IntsRef |
deepCopyOf(IntsRef other)
Creates a new IntsRef that points to a copy of the ints from
other |
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
intsEquals(IntsRef other) |
boolean |
isEmpty() |
boolean |
isValid()
Performs internal consistency checks.
|
String |
toString() |
public static final IntsRef EMPTY
public final int[] ints
null
.public final int offset
public final int length
public IntsRef(int capacity)
capacity
leading to capacity*32 bits.
Offset will be zero and length will be the capacity.public IntsRef(int[] ints, int offset, int length)
public boolean intsEquals(IntsRef other)
public int compareTo(IntsRef other)
compareTo
in interface Comparable<IntsRef>
public static IntsRef deepCopyOf(IntsRef other)
other
The returned IntsRef will have a length of other.length and an offset of zero.
public boolean isValid()
public boolean isEmpty()
Copyright © 2012–2020. All rights reserved.