Package com.github.stephengold.joltjni
Class ContactList
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A variable-length list (array) of character contacts. (native type:
Array<Contact>)-
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Count how many contacts the currently allocated storage can hold.get(int elementIndex) Access the contact at the specified index.voidresize(int numContacts) Expand or truncate the list.voidPut the specified contact at the specified index.intsize()Count how many contacts are in the list.Methods inherited from class com.github.stephengold.joltjni.template.Array
clear, empty, pushBack, toListMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Method Details
-
capacity
public int capacity()Count how many contacts the currently allocated storage can hold. The list is unaffected. -
get
Access the contact at the specified index. -
resize
public void resize(int numContacts) Expand or truncate the list. -
set
Put the specified contact at the specified index. -
size
public int size()Count how many contacts are in the list. The list is unaffected.
-