com.sun.jna.platform.mac

## Class CoreFoundation.CFDictionaryRef

- java.lang.Object
- - com.sun.jna.PointerType
  - - com.sun.jna.platform.mac.CoreFoundation.CFTypeRef
    - - com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef

All Implemented Interfaces:
  NativeMapped

Direct Known Subclasses:
  CoreFoundation.CFMutableDictionaryRef

Enclosing interface:
  CoreFoundation

    public static class CoreFoundation.CFDictionaryRef
    extends CoreFoundation.CFTypeRef

A reference to an immutable `CFDictionary` object.

### Nested Class Summary

Nested Classes
`static class` `CoreFoundation.CFDictionaryRef.ByReference` Placeholder for a reference to a `CFDictionary` object.

### Constructor Summary

Constructors
Constructor and Description
`CFDictionaryRef()`
`CFDictionaryRef(Pointer p)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getCount()` Convenience method for `CoreFoundation.CFDictionaryGetCount(CFDictionaryRef)` on this object.
`Pointer` `getValue(PointerType key)` Convenience method for `CoreFoundation.CFDictionaryGetValue(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.PointerType)` on this object.
`boolean` `getValueIfPresent(PointerType key, PointerByReference value)` Convenience method for `CoreFoundation.CFDictionaryGetValueIfPresent(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.PointerType, com.sun.jna.ptr.PointerByReference)` on this object.

### Methods inherited from class com.sun.jna.platform.mac.CoreFoundation.CFTypeRef

`getTypeID, isTypeID, release, retain`

### Methods inherited from class com.sun.jna.PointerType

`equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CFDictionaryRef

    public CFDictionaryRef()

#### CFDictionaryRef

    public CFDictionaryRef(Pointer p)

### Method Detail

#### getValue

    public Pointer getValue(PointerType key)

Convenience method for `CoreFoundation.CFDictionaryGetValue(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.PointerType)` on this object.

Parameters:
  `key` - The key for which to find a match.
Returns:
  The value associated with key, or `null` if no key-value pair matching key exists.

#### getCount

    public long getCount()

Convenience method for `CoreFoundation.CFDictionaryGetCount(CFDictionaryRef)` on this object.

Returns:
  The number of key-value pairs in theDict.

#### getValueIfPresent

    public boolean getValueIfPresent(PointerType key,
                                     PointerByReference value)

Convenience method for `CoreFoundation.CFDictionaryGetValueIfPresent(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.PointerType, com.sun.jna.ptr.PointerByReference)` on this object.

Parameters:
  `key` - The key for which to find a match.
  `value` - A pointer to memory which, on return, is filled with the pointer-sized value if a matching key is found.
Returns:
  `true` if a matching key was found, otherwise `false`

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.