|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
net.wotonomy.foundation.NSDictionary
public class NSDictionary
A pure java implementation of NSDictionary that implements Map for greater java interoperability.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
|---|
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.Null, NSKeyValueCoding.Utility |
| Field Summary | |
|---|---|
static NSDictionary |
EmptyDictionary
|
| Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
|---|
NullValue |
| Constructor Summary | |
|---|---|
NSDictionary()
Default constructor produces an empty dictionary. |
|
NSDictionary(int initialCapacity)
Constructor produces an empty dictionary with an initial capacity. |
|
NSDictionary(java.util.Map aMap)
Produces a dictionary that is a copy of the specified map (or dictionary). |
|
NSDictionary(java.lang.Object[] objects,
java.lang.Object[] keys)
Produces a dictionary containing the specified keys and values. |
|
NSDictionary(java.lang.Object key,
java.lang.Object value)
Produces a dictionary that contains one key referencing one value. |
|
| Method Summary | |
|---|---|
NSArray |
allKeys()
Returns an NSArray containing all keys in this dictionary. |
NSArray |
allKeysForObject(java.lang.Object value)
Returns an NSArray containing all keys that reference the specified value. |
NSArray |
allValues()
Returns an NSArray containing all values in this dictionary. |
int |
count()
Returns a count of the key-value pairs in this dictionary. |
java.lang.Object |
handleQueryWithUnboundKey(java.lang.String aKey)
Called by valueForKey when the specified key is not found on this object. |
void |
handleTakeValueForUnboundKey(java.lang.Object aValue,
java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on this object. |
boolean |
isEqualToDictionary(NSDictionary aDictionary)
Returns whether the specified dictionary has the same or equivalent key-value pairs as this dictionary. |
java.util.Enumeration |
keyEnumerator()
Returns an enumeration over the keys in this dictionary. |
java.util.Enumeration |
objectEnumerator()
Returns an enumeration over the values in this dictionary. |
java.lang.Object |
objectForKey(java.lang.Object aKey)
Returns the value for the specified key, or null if the key is not found. |
NSArray |
objectsForKeys(NSArray anArray,
java.lang.Object aMarker)
Returns an array of objects for the specified array of keys. |
java.lang.Object |
storedValueForKey(java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property. |
void |
takeStoredValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value. |
void |
takeValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the property to the specified value. |
java.lang.String |
toString()
|
void |
unableToSetNullForKey(java.lang.String aKey)
Called by takeValueForKey when the type of the specified key is not allowed to be null, as is the case with primitive types. |
java.lang.Object |
validateTakeValueForKeyPath(java.lang.Object aValue,
java.lang.String aKey)
|
java.lang.Object |
valueForKey(java.lang.String aKey)
Returns the value for the specified property. |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final NSDictionary EmptyDictionary
| Constructor Detail |
|---|
public NSDictionary()
public NSDictionary(int initialCapacity)
public NSDictionary(java.lang.Object key,
java.lang.Object value)
public NSDictionary(java.lang.Object[] objects,
java.lang.Object[] keys)
public NSDictionary(java.util.Map aMap)
| Method Detail |
|---|
public int count()
public NSArray allKeys()
public NSArray allKeysForObject(java.lang.Object value)
public NSArray allValues()
public boolean isEqualToDictionary(NSDictionary aDictionary)
public NSArray objectsForKeys(NSArray anArray,
java.lang.Object aMarker)
public java.util.Enumeration keyEnumerator()
public java.util.Enumeration objectEnumerator()
public java.lang.Object objectForKey(java.lang.Object aKey)
public java.lang.Object valueForKey(java.lang.String aKey)
NSKeyValueCoding
valueForKey in interface NSKeyValueCoding
public void takeValueForKey(java.lang.Object aValue,
java.lang.String aKey)
NSKeyValueCoding
takeValueForKey in interface NSKeyValueCodingpublic java.lang.Object storedValueForKey(java.lang.String aKey)
NSKeyValueCoding
storedValueForKey in interface NSKeyValueCoding
public void takeStoredValueForKey(java.lang.Object aValue,
java.lang.String aKey)
NSKeyValueCoding
takeStoredValueForKey in interface NSKeyValueCodingpublic java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
NSKeyValueCoding
handleQueryWithUnboundKey in interface NSKeyValueCoding
public void handleTakeValueForUnboundKey(java.lang.Object aValue,
java.lang.String aKey)
NSKeyValueCoding
handleTakeValueForUnboundKey in interface NSKeyValueCodingpublic void unableToSetNullForKey(java.lang.String aKey)
NSKeyValueCoding
unableToSetNullForKey in interface NSKeyValueCoding
public java.lang.Object validateTakeValueForKeyPath(java.lang.Object aValue,
java.lang.String aKey)
public java.lang.String toString()
toString in class java.util.AbstractMap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||