@Name(value="bool") public class BoolPointer extends Pointer
bool.
All operations take into account the position and limit, when appropriate.
We need this class because C++ does not define the size of the bool type.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.DeallocatorReference, Pointer.DeallocatorThread, Pointer.NativeDeallocatoraddress, capacity, deallocatorThread, limit, maxBytes, maxPhysicalBytes, maxRetries, position| Constructor and Description |
|---|
BoolPointer() |
BoolPointer(long size)
Allocates a native
bool array of the given size. |
BoolPointer(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
private void |
allocateArray(long size) |
BoolPointer |
capacity(long capacity)
Sets the capacity and returns this.
|
boolean |
get() |
boolean |
get(long i) |
BoolPointer |
limit(long limit)
Sets the limit and returns this.
|
BoolPointer |
position(long position)
Sets the position and returns this.
|
BoolPointer |
put(boolean b) |
BoolPointer |
put(long i,
boolean b)
Copies the
bool value to the i-th element of a native array. |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, init, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic BoolPointer(long size)
bool array of the given size.size - the number of bool elements to allocatepublic BoolPointer()
Pointer.Pointer()public BoolPointer(Pointer p)
Pointer.Pointer(Pointer)private void allocateArray(long size)
public BoolPointer position(long position)
Pointerarray.position(i)
statement sort of equivalent to the array[i] statement in C++.position in class Pointerposition - the new positionPointer.position(long)public BoolPointer limit(long limit)
Pointerlimit in class Pointerlimit - the new limitPointer.limit(long)public BoolPointer capacity(long capacity)
Pointercapacity in class Pointercapacity - the new capacityPointer.capacity(long)public boolean get()
get(0)@Cast(value="bool") public boolean get(long i)
i - bool value of a native arraypublic BoolPointer put(boolean b)
put(0, b)public BoolPointer put(long i, boolean b)
bool value to the i-th element of a native array.i - the index into the arrayb - the bool value to copyCopyright © 2017. All rights reserved.