K - type of key contentsV - type of value contentspublic class NSDictionary<K,V> extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, NSCoding, NSKeyValueCoding, NSKeyValueCodingAdditions, _NSFoundationCollection, java.util.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.SupportNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._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 java.lang.Class |
_CLASS |
protected int |
_count |
protected int |
_deletionLimit |
protected java.util.Set<java.util.Map.Entry<K,V>> |
_entrySetCache |
protected byte[] |
_flags |
protected int |
_hashCache |
protected int |
_hashtableBuckets |
protected java.lang.Object[] |
_keys |
protected java.lang.Object[] |
_keysCache |
protected java.util.Set<K> |
_keySetCache |
static java.lang.Class |
_MAP_ENTRY_CLASS |
protected static int |
_NSDictionaryClassHashCode |
protected static int |
_NSDictionaryMapEntryHashCode |
protected java.lang.Object[] |
_objects |
protected java.lang.Object[] |
_objectsCache |
static boolean |
CheckForNull |
static NSDictionary |
EmptyDictionary |
static boolean |
IgnoreNull |
_KeyPathSeparatorChar, KeyPathSeparatorNullValue| Constructor and Description |
|---|
NSDictionary() |
NSDictionary(java.util.Dictionary<? extends K,? extends V> dictionary,
boolean ignoreNull) |
NSDictionary(java.util.Map<? extends K,? extends V> map) |
NSDictionary(java.util.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) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_clearDeletionsAndCollisions() |
protected void |
_ensureCapacity(int capacity) |
protected void |
_initializeDictionary() |
int |
_shallowHashCode() |
NSArray<K> |
allKeys() |
NSArray<K> |
allKeysForObject(java.lang.Object object) |
NSArray<V> |
allValues() |
java.lang.Class |
classForCoder() |
void |
clear() |
java.lang.Object |
clone() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
int |
count() |
static java.lang.Object |
decodeObject(NSCoder coder) |
static <K,V> NSDictionary<K,V> |
emptyDictionary() |
void |
encodeWithCoder(NSCoder coder) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object object) |
V |
get(java.lang.Object key) |
int |
hashCode() |
java.util.HashMap<K,V> |
hashMap() |
java.util.Hashtable<K,V> |
hashtable() |
NSDictionary<K,V> |
immutableClone() |
boolean |
isEmpty() |
boolean |
isEqualToDictionary(NSDictionary<?,?> otherDictionary) |
java.util.Enumeration<K> |
keyEnumerator() |
java.util.Set<K> |
keySet() |
protected java.lang.Object[] |
keysNoCopy() |
NSMutableDictionary<K,V> |
mutableClone() |
java.util.Enumeration<V> |
objectEnumerator() |
V |
objectForKey(java.lang.Object key) |
NSArray<V> |
objectsForKeys(NSArray<? extends K> keys,
V notFoundMarker) |
protected java.lang.Object[] |
objectsNoCopy() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> t) |
V |
remove(java.lang.Object key) |
int |
size() |
void |
takeValueForKey(java.lang.Object value,
java.lang.String key) |
void |
takeValueForKeyPath(java.lang.Object value,
java.lang.String keyPath) |
java.lang.String |
toString() |
java.lang.Object |
valueForKey(java.lang.String key) |
java.lang.Object |
valueForKeyPath(java.lang.String keyPath) |
java.util.Collection<V> |
values() |
public static final java.lang.Class _CLASS
public static final java.lang.Class _MAP_ENTRY_CLASS
public static final NSDictionary EmptyDictionary
protected transient int _capacity
protected transient int _hashtableBuckets
protected transient int _count
protected java.lang.Object[] _objects
protected transient java.lang.Object[] _objectsCache
protected transient byte[] _flags
protected java.lang.Object[] _keys
protected transient java.lang.Object[] _keysCache
protected transient int _hashCache
protected transient int _deletionLimit
protected static int _NSDictionaryClassHashCode
protected static int _NSDictionaryMapEntryHashCode
protected java.util.Set<K> _keySetCache
public static final boolean CheckForNull
public static final boolean IgnoreNull
public NSDictionary()
public NSDictionary(NSDictionary<? extends K,? extends V> otherDictionary)
protected void _initializeDictionary()
protected void _ensureCapacity(int capacity)
protected void _clearDeletionsAndCollisions()
protected java.lang.Object[] keysNoCopy()
protected java.lang.Object[] objectsNoCopy()
public int count()
public V objectForKey(java.lang.Object key)
public boolean isEqualToDictionary(NSDictionary<?,?> otherDictionary)
public boolean equals(java.lang.Object object)
public java.util.Enumeration<K> keyEnumerator()
public java.util.Enumeration<V> objectEnumerator()
public java.lang.Object valueForKey(java.lang.String key)
valueForKey in interface NSKeyValueCodingpublic void takeValueForKey(java.lang.Object value,
java.lang.String key)
takeValueForKey in interface NSKeyValueCodingpublic java.lang.Object valueForKeyPath(java.lang.String keyPath)
valueForKeyPath in interface NSKeyValueCodingAdditionspublic void takeValueForKeyPath(java.lang.Object value,
java.lang.String keyPath)
takeValueForKeyPath in interface NSKeyValueCodingAdditionspublic java.lang.Class classForCoder()
classForCoder in interface NSCodingpublic static final <K,V> NSDictionary<K,V> emptyDictionary()
public static java.lang.Object decodeObject(NSCoder coder)
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic int _shallowHashCode()
_shallowHashCode in interface _NSFoundationCollectionpublic int hashCode()
public java.lang.Object clone()
clone in class java.lang.Objectpublic NSDictionary<K,V> immutableClone()
public NSMutableDictionary<K,V> mutableClone()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
Copyright © 2002 – 2022 Project Wonder.