wt.fc.collections
Interface WTKeyedMap

All Superinterfaces:
Map
All Known Subinterfaces:
WTValuedMap
All Known Implementing Classes:
EmptyCollections.EmptyKeyedMap, EmptyCollections.EmptyValuedMap, SynchronizedCollections.SynchronizedKeyedMap, SynchronizedCollections.SynchronizedValuedMap, UnmodifiableCollections.UnmodifiableKeyedMap, UnmodifiableCollections.UnmodifiableValuedMap, WTKeyedHashMap, WTValuedHashMap

public interface WTKeyedMap
extends Map

A Map in which the keys are a WTSet. This means that the keys in the put() methods must obey the contract of WTCollection.add(Object).

Supported API: true

Extendable: false

See Also:
WTSet

Nested Class Summary
static interface WTKeyedMap.WTEntry
          Allows access to the keys in the entry in either Persistable, WTReference, or QueryKey forms
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
static String DEFLATED_ON_SERIALIZATION
          Label for the attribute.
 
Method Summary
 void clear()
          

Supported API: true
 Object connect(Persistable p, Object value, WTKeyedMap source)
          Adds the mapping for the given key to this map from the source map.
 Object connect(Persistable p, WTKeyedMap source)
          Adds the mapping for the given key to this map from the source map.
 Object connect(Persistable p, WTKeyedMap source, boolean put_if_not_present)
          Adds the mapping for the given key to this map from the source map.
 Object connect(QueryKey query_key, Object value, WTKeyedMap source)
          Connects the given key with the key in source.
 Object connect(QueryKey query_key, WTKeyedMap source)
          Adds the mapping for the given key to this map from the source map.
 Object connect(QueryKey query_key, WTKeyedMap source, boolean put_if_not_present)
          Connects the given key with the key in source.
 Object connect(WTReference ref, Object value, WTKeyedMap source)
          Connects the given key with the key in source.
 Object connect(WTReference ref, WTKeyedMap source)
          Adds the mapping for the given key to this map from the source map.
 Object connect(WTReference ref, WTKeyedMap source, boolean put_if_not_present)
          Adds the mapping for the given key to this map from the source map.
 void connectAll(WTKeyedMap source)
          Adds the mappings from the source map to this map.
 void connectAll(WTKeyedMap source, boolean put_if_not_present)
          Adds the mappings from the source map to this map.
 boolean containsKey(Object key)
          

Supported API: true
 boolean containsKey(Persistable p)
          

Supported API: true
 boolean containsKey(QueryKey query_key)
          

Supported API: true
 boolean containsKey(WTReference ref)
          

Supported API: true
 boolean containsValue(Object value)
          

Supported API: true
 Set entrySet()
          

Supported API: true
 boolean equals(Object o)
          

Supported API: true
 Object get(Object key)
          

Supported API: true
 Object get(Persistable p)
          

Supported API: true
 Object get(QueryKey query_key)
          

Supported API: true
 Object get(WTReference ref)
          

Supported API: true
 int getKeyMask()
          

Supported API: true
 int hashCode()
          

Supported API: true
 boolean isDeflatedOnSerialization()
          Gets the value of the attribute: DEFLATED_ON_SERIALIZATION.
 boolean isEmpty()
          

Supported API: true
 boolean isEnabled(int mask)
          

Supported API: true
 Set keySet()
          

Supported API: true
 Object put(Object key, Object value)
          

Supported API: true
 Object put(Persistable p, Object value)
          

Supported API: true
 Object put(QueryKey query_key, Object value)
          

Supported API: true
 Object put(WTReference ref, Object value)
          

Supported API: true
 void putAll(Map map)
          

Supported API: true
 Object remove(Object key)
          

Supported API: true
 Object remove(Persistable p)
          

Supported API: true
 Object remove(QueryKey query_key)
          

Supported API: true
 Object remove(WTReference ref)
          

Supported API: true
 void setDeflatedOnSerialization(boolean a_DeflatedOnSerialization)
          Sets the value of the attribute: DEFLATED_ON_SERIALIZATION.
 int size()
          

Supported API: true
 Collection values()
          

Supported API: true
 WTSet wtKeySet()
          

Supported API: true
 

Field Detail

DEFLATED_ON_SERIALIZATION

public static final String DEFLATED_ON_SERIALIZATION
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

isDeflatedOnSerialization

public boolean isDeflatedOnSerialization()
Gets the value of the attribute: DEFLATED_ON_SERIALIZATION.

Supported API: false

Returns:
boolean

setDeflatedOnSerialization

public void setDeflatedOnSerialization(boolean a_DeflatedOnSerialization)
                                throws WTPropertyVetoException
Sets the value of the attribute: DEFLATED_ON_SERIALIZATION.

Supported API: false

Parameters:
a_DeflatedOnSerialization -
Throws:
WTPropertyVetoException

clear

public void clear()


Supported API: true

Specified by:
clear in interface Map

connect

public Object connect(Persistable p,
                      WTKeyedMap source)
Adds the mapping for the given key to this map from the source map. If the key does not exist in source, then it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: false

Parameters:
p -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap
See Also:
connect(Persistable,WTKeyedMap,boolean)

connect

public Object connect(QueryKey query_key,
                      WTKeyedMap source)
Adds the mapping for the given key to this map from the source map. If the key does not exists in source, then it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: false

Parameters:
query_key -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap
See Also:
connect(Persistable,WTKeyedMap,boolean)

connect

public Object connect(WTReference ref,
                      WTKeyedMap source)
Adds the mapping for the given key to this map from the source map. If the key does not exists in source, then it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: false

Parameters:
ref -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap
See Also:
connect(WTReference,WTKeyedMap,boolean)

connect

public Object connect(Persistable p,
                      WTKeyedMap source,
                      boolean put_if_not_present)
Adds the mapping for the given key to this map from the source map. If put_if_not_present is true, then if the key does not exist in source, it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: true

Parameters:
p -
source -
put_if_not_present -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connect

public Object connect(WTReference ref,
                      WTKeyedMap source,
                      boolean put_if_not_present)
Adds the mapping for the given key to this map from the source map. If put_if_not_present is true, then if the key does not exist in source, it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: true

Parameters:
ref -
source -
put_if_not_present -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connect

public Object connect(QueryKey query_key,
                      WTKeyedMap source,
                      boolean put_if_not_present)
Connects the given key with the key in source. If put_if_not_present is true, then if the key does not exist in source, it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: true

Parameters:
query_key -
source -
put_if_not_present -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connect

public Object connect(Persistable p,
                      Object value,
                      WTKeyedMap source)
Adds the mapping for the given key to this map from the source map. If the key does not exist in source, then it is mapped to null. Otherwise, when the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa.

Supported API: true

Parameters:
p -
value -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connect

public Object connect(QueryKey query_key,
                      Object value,
                      WTKeyedMap source)
Connects the given key with the key in source. When the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa..

Supported API: true

Parameters:
query_key -
value -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connect

public Object connect(WTReference ref,
                      Object value,
                      WTKeyedMap source)
Connects the given key with the key in source. When the key is inflated or refreshed in the source, it is also inflated or refreshed in this map, and vice versa..

Supported API: true

Parameters:
ref -
value -
source -
Returns:
The old value for key in this map, if any
Throws:
IllegalArgumentException - If the source does not have the same key type as this map.
ClassCastException - If this map does not support connection with the source's implementation of WTKeyedMap

connectAll

public void connectAll(WTKeyedMap source)
Adds the mappings from the source map to this map. When the keys are inflated or refreshed in the source map, they are also inflated or refreshed in this map, and vice versa.

Supported API: false

Parameters:
source -
Throws:
IllegalArgumentException - If source does not have the same key type as this map
ClassCastException - If this map does not support connection with source's implementation of WTKeyedMap.
See Also:
connectAll(WTKeyedMap,boolean)

connectAll

public void connectAll(WTKeyedMap source,
                       boolean put_if_not_present)
Adds the mappings from the source map to this map. When the keys are inflated or refreshed in the source map, they are also inflated or refreshed in this map, and vice versa. If put_if_not_present is true, then mappings in the source map that don't exist in this map are added to this map.

Supported API: true

Parameters:
source -
put_if_not_present -
Throws:
IllegalArgumentException - If source does not have the same key type as this map
ClassCastException - If this map does not support connection with source's implementation of WTKeyedMap.

containsKey

public boolean containsKey(Object key)


Supported API: true

Specified by:
containsKey in interface Map
Parameters:
key -
Returns:
boolean

containsKey

public boolean containsKey(Persistable p)


Supported API: true

Parameters:
p -
Returns:
boolean

containsKey

public boolean containsKey(QueryKey query_key)


Supported API: true

Parameters:
query_key -
Returns:
boolean

containsKey

public boolean containsKey(WTReference ref)


Supported API: true

Parameters:
ref -
Returns:
boolean

containsValue

public boolean containsValue(Object value)


Supported API: true

Specified by:
containsValue in interface Map
Parameters:
value -
Returns:
boolean

entrySet

public Set entrySet()


Supported API: true

Specified by:
entrySet in interface Map
Returns:
Set

equals

public boolean equals(Object o)


Supported API: true

Specified by:
equals in interface Map
Parameters:
o -
Returns:
boolean

get

public Object get(Object key)


Supported API: true

Specified by:
get in interface Map
Parameters:
key -
Returns:
Object

get

public Object get(Persistable p)


Supported API: true

Parameters:
p -
Returns:
Object

get

public Object get(QueryKey query_key)


Supported API: true

Parameters:
query_key -
Returns:
Object

get

public Object get(WTReference ref)


Supported API: true

Parameters:
ref -
Returns:
Object

getKeyMask

public int getKeyMask()


Supported API: true

Returns:
int

hashCode

public int hashCode()


Supported API: true

Specified by:
hashCode in interface Map
Returns:
int

isEmpty

public boolean isEmpty()


Supported API: true

Specified by:
isEmpty in interface Map
Returns:
boolean

isEnabled

public boolean isEnabled(int mask)


Supported API: true

Parameters:
mask -
Returns:
boolean

keySet

public Set keySet()


Supported API: true

Specified by:
keySet in interface Map
Returns:
Set

put

public Object put(Object key,
                  Object value)


Supported API: true

Specified by:
put in interface Map
Parameters:
key -
value -
Returns:
Object

put

public Object put(Persistable p,
                  Object value)


Supported API: true

Parameters:
p -
value -
Returns:
Object

put

public Object put(QueryKey query_key,
                  Object value)


Supported API: true

Parameters:
query_key -
value -
Returns:
Object

put

public Object put(WTReference ref,
                  Object value)


Supported API: true

Parameters:
ref -
value -
Returns:
Object

putAll

public void putAll(Map map)


Supported API: true

Specified by:
putAll in interface Map
Parameters:
map -

remove

public Object remove(Object key)


Supported API: true

Specified by:
remove in interface Map
Parameters:
key -
Returns:
Object

remove

public Object remove(Persistable p)


Supported API: true

Parameters:
p -
Returns:
Object

remove

public Object remove(QueryKey query_key)


Supported API: true

Parameters:
query_key -
Returns:
Object

remove

public Object remove(WTReference ref)


Supported API: true

Parameters:
ref -
Returns:
Object

size

public int size()


Supported API: true

Specified by:
size in interface Map
Returns:
int

values

public Collection values()


Supported API: true

Specified by:
values in interface Map
Returns:
Collection

wtKeySet

public WTSet wtKeySet()


Supported API: true

Returns:
WTSet