public class NSDictionary extends NSObject implements Map<String,NSObject>
allKeys().
Access to the objects stored for each key is given through the function objectForKey(String key).LinkedHashMap| Constructor and Description |
|---|
NSDictionary()
Creates a new NSDictionary instance.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
allKeys()
Gets a list of all keys used in this NSDictionary.
|
void |
clear()
Removes all key-value pairs from this dictionary.
|
NSDictionary |
clone()
Creates and returns a deep copy of this instance.
|
boolean |
containsKey(Object key) |
boolean |
containsKey(String key)
Checks whether a given key is contained in this dictionary.
|
boolean |
containsValue(boolean val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(byte[] val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(Date val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(double val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(long val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(NSObject val)
Checks whether a given value is contained in this dictionary.
|
boolean |
containsValue(Object value) |
boolean |
containsValue(String val)
Checks whether a given value is contained in this dictionary.
|
int |
count()
Counts the number of contained key-value pairs.
|
Set<Map.Entry<String,NSObject>> |
entrySet() |
boolean |
equals(Object obj) |
NSObject |
get(Object key) |
HashMap<String,NSObject> |
getHashMap()
Gets the hash map which stores the keys and values of this dictionary.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
NSObject |
objectForKey(String key)
Gets the NSObject stored for the given key.
|
NSObject |
put(String key,
NSObject obj)
Puts a new key-value pair into this dictionary.
|
NSObject |
put(String key,
Object obj)
Puts a new key-value pair into this dictionary.
|
void |
putAll(Map<? extends String,? extends NSObject> values) |
NSObject |
remove(Object key) |
NSObject |
remove(String key)
Removes a key-value pair from this dictionary.
|
int |
size() |
protected void |
toASCII(StringBuilder ascii,
int level)
Generates the ASCII representation of this object.
|
protected void |
toASCIIGnuStep(StringBuilder ascii,
int level)
Generates the ASCII representation of this object in the GnuStep format.
|
String |
toASCIIPropertyList()
Generates a valid ASCII property list which has this NSDictionary as its
root object.
|
String |
toGnuStepASCIIPropertyList()
Generates a valid ASCII property list in GnuStep format which has this
NSDictionary as its root object.
|
Collection<NSObject> |
values() |
fromJavaObject, toJavaObject, toJavaObject, toXMLPropertyListfinalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic HashMap<String,NSObject> getHashMap()
public NSObject objectForKey(String key)
key - The key.public boolean containsKey(Object key)
containsKey in interface Map<String,NSObject>public boolean containsValue(Object value)
containsValue in interface Map<String,NSObject>public NSObject put(String key, NSObject obj)
public NSObject put(String key, Object obj)
key - The key.obj - The value. Supported object types are numbers, byte-arrays, dates, strings and arrays or sets of those.public NSObject remove(String key)
key - The keypublic void clear()
clear in interface Map<String,NSObject>Map.clear()public boolean containsKey(String key)
key - The key that will be searched for.public boolean containsValue(NSObject val)
val - The value that will be searched for.public boolean containsValue(String val)
val - The value that will be searched for.public boolean containsValue(long val)
val - The value that will be searched for.public boolean containsValue(double val)
val - The value that will be searched for.public boolean containsValue(boolean val)
val - The value that will be searched for.public boolean containsValue(Date val)
val - The value that will be searched for.public boolean containsValue(byte[] val)
val - The value that will be searched for.public int count()
public boolean equals(Object obj)
public String[] allKeys()
public int hashCode()
public NSDictionary clone()
NSObjectpublic String toASCIIPropertyList()
public String toGnuStepASCIIPropertyList()
protected void toASCII(StringBuilder ascii, int level)
NSObjecttoASCII in class NSObjectascii - The StringBuilder onto which the ASCII representation is appended.level - The indentation level of the object.protected void toASCIIGnuStep(StringBuilder ascii, int level)
NSObjecttoASCIIGnuStep in class NSObjectascii - The StringBuilder onto which the ASCII representation is appended.level - The indentation level of the object.Copyright © 2019. All Rights Reserved.