K
- type of key contentsV
- type of value contentspublic class NSDictionary<K,V> extends Object implements Cloneable, Serializable, NSCoding, NSKeyValueCoding, NSKeyValueCodingAdditions, _NSFoundationCollection, Map<K,V>
NSDictionary<String, String> env = new NSDictionary<String, String>(System.getenv(), true);
for (String key : env)
logger.debug(env.valueForKey(key));
Modifier and Type | Class and Description |
---|---|
class |
NSDictionary._JavaNSDictionaryMapEntry<P,Q> |
NSCoding._BigDecimalSupport, NSCoding._BigIntegerSupport, NSCoding._BooleanSupport, NSCoding._ByteSupport, NSCoding._CharacterSupport, NSCoding._DateSupport, NSCoding._DoubleSupport, NSCoding._FloatSupport, NSCoding._IntegerSupport, NSCoding._LongSupport, NSCoding._NumberSupport, NSCoding._ShortSupport, NSCoding._StringSupport, NSCoding.Support
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
protected int |
_capacity |
static Class |
_CLASS |
protected int |
_count |
protected int |
_deletionLimit |
protected Set<Map.Entry<K,V>> |
_entrySetCache |
protected byte[] |
_flags |
protected int |
_hashCache |
protected int |
_hashtableBuckets |
protected Object[] |
_keys |
protected Object[] |
_keysCache |
protected Set<K> |
_keySetCache |
static Class |
_MAP_ENTRY_CLASS |
protected static int |
_NSDictionaryClassHashCode |
protected static int |
_NSDictionaryMapEntryHashCode |
protected Object[] |
_objects |
protected Object[] |
_objectsCache |
static boolean |
CheckForNull |
static NSDictionary |
EmptyDictionary |
static boolean |
IgnoreNull |
_KeyPathSeparatorChar, KeyPathSeparator
NullValue
Constructor and Description |
---|
NSDictionary() |
NSDictionary(Dictionary<? extends K,? extends V> dictionary,
boolean ignoreNull) |
NSDictionary(Map<? extends K,? extends V> map) |
NSDictionary(Map<? extends K,? extends V> map,
boolean ignoreNull) |
NSDictionary(NSArray<? extends V> objects,
NSArray<? extends K> keys) |
NSDictionary(NSDictionary<? extends K,? extends V> otherDictionary) |
NSDictionary(V[] objects,
K[] keys) |
NSDictionary(V object,
K key) |
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public static final Class _CLASS
public static final Class _MAP_ENTRY_CLASS
public static final NSDictionary EmptyDictionary
protected transient int _capacity
protected transient int _hashtableBuckets
protected transient int _count
protected Object[] _objects
protected transient Object[] _objectsCache
protected transient byte[] _flags
protected Object[] _keys
protected transient Object[] _keysCache
protected transient int _hashCache
protected transient int _deletionLimit
protected static int _NSDictionaryClassHashCode
protected static int _NSDictionaryMapEntryHashCode
public static final boolean CheckForNull
public static final boolean IgnoreNull
public NSDictionary()
public NSDictionary(NSDictionary<? extends K,? extends V> otherDictionary)
public NSDictionary(Dictionary<? extends K,? extends V> dictionary, boolean ignoreNull)
protected void _initializeDictionary()
protected void _ensureCapacity(int capacity)
protected void _clearDeletionsAndCollisions()
protected Object[] keysNoCopy()
protected Object[] objectsNoCopy()
public int count()
public boolean isEqualToDictionary(NSDictionary<?,?> otherDictionary)
public boolean equals(Object object)
public Enumeration<K> keyEnumerator()
public Enumeration<V> objectEnumerator()
public Object valueForKey(String key)
valueForKey
in interface NSKeyValueCoding
public void takeValueForKey(Object value, String key)
takeValueForKey
in interface NSKeyValueCoding
public Object valueForKeyPath(String keyPath)
valueForKeyPath
in interface NSKeyValueCodingAdditions
public void takeValueForKeyPath(Object value, String keyPath)
takeValueForKeyPath
in interface NSKeyValueCodingAdditions
public Class classForCoder()
classForCoder
in interface NSCoding
public static final <K,V> NSDictionary<K,V> emptyDictionary()
public void encodeWithCoder(NSCoder coder)
encodeWithCoder
in interface NSCoding
public int _shallowHashCode()
_shallowHashCode
in interface _NSFoundationCollection
public int hashCode()
public NSDictionary<K,V> immutableClone()
public NSMutableDictionary<K,V> mutableClone()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
Copyright © 2002 – 2017 Project Wonder.