ShortBuffer.Mismatch(ShortBuffer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds and returns the relative index of the first mismatch between this buffer and a given buffer.
[Android.Runtime.Register("mismatch", "(Ljava/nio/ShortBuffer;)I", "GetMismatch_Ljava_nio_ShortBuffer_Handler", ApiSince=34)]
public virtual int Mismatch (Java.Nio.ShortBuffer? that);
[<Android.Runtime.Register("mismatch", "(Ljava/nio/ShortBuffer;)I", "GetMismatch_Ljava_nio_ShortBuffer_Handler", ApiSince=34)>]
abstract member Mismatch : Java.Nio.ShortBuffer -> int
override this.Mismatch : Java.Nio.ShortBuffer -> int
Parameters
- that
- ShortBuffer
The byte buffer to be tested for a mismatch with this buffer
Returns
The relative index of the first mismatch between this and the given buffer, otherwise -1 if no mismatch.
- Attributes
Remarks
Finds and returns the relative index of the first mismatch between this buffer and a given buffer. The index is relative to the #position() position
of each buffer and will be in the range of 0 (inclusive) up to the smaller of the #remaining() remaining
elements in each buffer (exclusive).
If the two buffers share a common prefix then the returned index is the length of the common prefix and it follows that there is a mismatch between the two buffers at that index within the respective buffers. If one buffer is a proper prefix of the other then the returned index is the smaller of the remaining elements in each buffer, and it follows that the index is only valid for the buffer with the larger number of remaining elements. Otherwise, there is no mismatch.
Added in 11.
Java documentation for java.nio.ShortBuffer.mismatch(java.nio.ShortBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.