Package org.robovm.rt.bro.ptr
Class BooleanPtr
- All Implemented Interfaces:
Iterable<BooleanPtr>
public final class BooleanPtr extends Struct<BooleanPtr>
Points to an 8-bit
boolean value. When reading 0 is interpreted as
false. and non-zero values are interpreted as true. When
writing 0 will be written for false and 1 will be written for
true.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBooleanPtr.BooleanPtrPtrPointer toBooleanPtrNested classes/interfaces inherited from class org.robovm.rt.bro.Struct
Struct.Marshaler -
Constructor Summary
Constructors Constructor Description BooleanPtr()Creates a newBooleanPtrwith a value offalse.BooleanPtr(boolean value)Creates a newBooleanPtrand initializes it with the specified value. -
Method Summary
Modifier and Type Method Description booleanget()Returns the current value.voidget(boolean[] dst)voidget(boolean[] dst, int offset, int count)Copiescountbooleans from the memory pointed to by thisBooleanPtrtodststarting at offsetoffset.voidset(boolean value)Sets the value.voidset(boolean[] src)voidset(boolean[] src, int offset, int count)Copiescountbooleans fromsrcstarting at offsetoffsetto the memory pointed to by thisBooleanPtr.boolean[]toBooleanArray(int n)Methods inherited from class org.robovm.rt.bro.Struct
_sizeOf, allocate, allocate, as, clear, clear, copy, copy, copyWithMalloc, copyWithMalloc, free, iterator, iterator, malloc, malloc, next, next, offsetOf, previous, previous, sizeOf, sizeOf, toArray, toList, toStruct, update, update, update, wrapMethods inherited from class org.robovm.rt.bro.NativeObject
equals, getHandle, hashCode, setHandle
-
Constructor Details
-
BooleanPtr
public BooleanPtr()Creates a newBooleanPtrwith a value offalse. -
BooleanPtr
public BooleanPtr(boolean value)Creates a newBooleanPtrand initializes it with the specified value.- Parameters:
value- the value.
-
-
Method Details
-
get
public boolean get()Returns the current value.- Returns:
- the value.
-
set
public void set(boolean value)Sets the value.- Parameters:
value- the new value.
-
toBooleanArray
public boolean[] toBooleanArray(int n)- Parameters:
n- the number ofbooleans to copy.- Returns:
- the
boolean[].
-
get
public void get(boolean[] dst)- Parameters:
dst- the destination.
-
get
public void get(boolean[] dst, int offset, int count)Copiescountbooleans from the memory pointed to by thisBooleanPtrtodststarting at offsetoffset.- Parameters:
dst- the destination.offset- the offset within the destination array to start copying to.count- the number of elements to copy.
-
set
public void set(boolean[] src)- Parameters:
src- the source.
-
set
public void set(boolean[] src, int offset, int count)Copiescountbooleans fromsrcstarting at offsetoffsetto the memory pointed to by thisBooleanPtr.- Parameters:
src- the source.offset- the offset within the source array to start copying from.count- the number of elements to copy.
-