Package com.github.stephengold.joltjni
Class PhysicsMaterialResult
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Result<PhysicsMaterialRef>
com.github.stephengold.joltjni.PhysicsMaterialResult
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Either an error or a
PhysicsMaterialRef
. (native type:
Result<Ref<PhysicsMaterial>>
)-
Method Summary
Modifier and TypeMethodDescriptionget()
Return thePhysicsMaterialRef
.protected String
getError
(long resultVa) Return the error message.protected boolean
hasError
(long resultVa) Test whether an error occurred.protected boolean
isValid
(long resultVa) Test whether the value returned byget()
is valid.Methods inherited from class com.github.stephengold.joltjni.template.Result
getError, hasError, isValid
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
get
Return thePhysicsMaterialRef
.- Specified by:
get
in classResult<PhysicsMaterialRef>
- Returns:
- a new JVM object with a new native object assigned
-
getError
Description copied from class:Result
Return the error message.- Specified by:
getError
in classResult<PhysicsMaterialRef>
- Parameters:
resultVa
- the virtual address of the result (not zero)- Returns:
- a string of text
-
hasError
protected boolean hasError(long resultVa) Description copied from class:Result
Test whether an error occurred.- Specified by:
hasError
in classResult<PhysicsMaterialRef>
- Parameters:
resultVa
- the virtual address of the result (not zero)- Returns:
true
if error, otherwisefalse
-
isValid
protected boolean isValid(long resultVa) Description copied from class:Result
Test whether the value returned byget()
is valid.- Specified by:
isValid
in classResult<PhysicsMaterialRef>
- Parameters:
resultVa
- the virtual address of the result (not zero)- Returns:
true
if valid, otherwisefalse
-