java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.std.IntPair
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class IntPair extends JoltPhysicsObject
A pair of integer values. (native type: std::pair<int, int>)
  • Constructor Details

    • IntPair

      public IntPair(int v0, int v1)
      Instantiate a pair with the values
      Parameters:
      v0 - the value for index=0
      v1 - the value for index=1
    • IntPair

      public IntPair(JoltPhysicsObject container, long pairVa)
      Instantiate with the specified container and native object.
      Parameters:
      container - the containing object, or null if none
      pairVa - 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