java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.std.IntPair
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A pair of integer values. (native type:
std::pair<int, int>)-
Constructor Summary
ConstructorsConstructorDescriptionIntPair(int v0, int v1) Instantiate a pair with the valuesIntPair(long pairVa, boolean owner) Instantiate a pair with the specified native object assigned.IntPair(JoltPhysicsObject container, long pairVa) Instantiate with the specified container and native object. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, targetVaOrZero, toString, va
-
Constructor Details
-
IntPair
public IntPair(int v0, int v1) Instantiate a pair with the values- Parameters:
v0- the value for index=0v1- the value for index=1
-
IntPair
Instantiate with the specified container and native object.- Parameters:
container- the containing object, ornullif nonepairVa- the virtual address of the native object to assign (not zero)
-
IntPair
public IntPair(long pairVa, boolean owner) Instantiate a pair with the specified native object assigned.- Parameters:
pairVa- the virtual address of the native object to assign (not zero)owner-true→ make the JVM object the owner,false→ it isn't the owner
-
-
Method Details
-
get
public int get(int index) Return the value at the specified index.- Parameters:
index- the index from which to read the value (0 or 1)- Returns:
- the stored value
-