Class CoreFoundation.CFNumberRef
- All Implemented Interfaces:
NativeMapped
- Enclosing interface:
- CoreFoundation
CFNumber object.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteConvert thisCFNumberto abyte.doubleConvert thisCFNumberto adouble.floatConvert thisCFNumberto afloat.intintValue()Convert thisCFNumberto anint.longConvert thisCFNumberto along.shortConvert thisCFNumberto ashort.Methods inherited from class com.sun.jna.platform.mac.CoreFoundation.CFTypeRef
getTypeID, isTypeID, release, retainMethods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
CFNumberRef
public CFNumberRef() -
CFNumberRef
-
-
Method Details
-
longValue
public long longValue()Convert thisCFNumberto along.This method assumes a 64-bit integer is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
long
-
intValue
public int intValue()Convert thisCFNumberto anint.This method assumes a 32-bit integer is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
int
-
shortValue
public short shortValue()Convert thisCFNumberto ashort.This method assumes a 16-bit integer is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
short
-
byteValue
public byte byteValue()Convert thisCFNumberto abyte.This method assumes an 8-bit integer is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
byte
-
doubleValue
public double doubleValue()Convert thisCFNumberto adouble.This method assumes a 64-bit floating point value is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
double
-
floatValue
public float floatValue()Convert thisCFNumberto afloat.This method assumes a 32-bit floating point value is stored and does not do type checking. Users should use
CoreFoundation.CFNumberGetType(com.sun.jna.platform.mac.CoreFoundation.CFNumberRef)to determine the appropriate type conversion. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.- Returns:
- The corresponding
float
-