wt.fc.collections
Interface WTValuedMap

All Superinterfaces:
Map, WTKeyedMap
All Known Implementing Classes:
EmptyCollections.EmptyValuedMap, SynchronizedCollections.SynchronizedValuedMap, UnmodifiableCollections.UnmodifiableValuedMap, WTValuedHashMap

public interface WTValuedMap
extends WTKeyedMap

A WTKeyedMap in which the values are a WTCollection. This means that values() returns a WTCollection and that the value in put(key,value) calls follows the same type constraints as the key.

Supported API: true

Extendable: false


Nested Class Summary
static interface WTValuedMap.WTValuedEntry
          Allows access to the value in this entry as either a Persistable, WTReference, or QueryKey.
 
Nested classes inherited from class wt.fc.collections.WTKeyedMap
WTKeyedMap.WTEntry
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from interface wt.fc.collections.WTKeyedMap
DEFLATED_ON_SERIALIZATION
 
Method Summary
 Persistable getPersistable(Persistable key)
          Get the value that maps to the given key as a Persistable.
 Persistable getPersistable(QueryKey key)
          Get the value that maps to the given key as a Persistable.
 Persistable getPersistable(WTReference key)
          Get the value that maps to the given key as a Persistable.
 QueryKey getQueryKey(Persistable key)
          Get the value that maps to the given key as a QueryKey.
 QueryKey getQueryKey(QueryKey key)
          Get the value that maps to the given key as a QueryKey.
 QueryKey getQueryKey(WTReference key)
          Get the value that maps to the given key as a QueryKey.
 WTReference getReference(Persistable key)
          Get the value that maps to the given key as a WTReference.
 WTReference getReference(QueryKey key)
          Get the value that maps to the given key as a WTReference.
 WTReference getReference(WTReference key)
          Get the value that maps to the given key as a WTReference.
 int getValueMask()
          Get the key mask for the WTCollection of values in this map.
 WTCollection wtValues()
          Convenience method that returns the values in this map as a WTCollection.
 
Methods inherited from interface wt.fc.collections.WTKeyedMap
clear, connect, connect, connect, connect, connect, connect, connect, connect, connect, connectAll, connectAll, containsKey, containsKey, containsKey, containsKey, containsValue, entrySet, equals, get, get, get, get, getKeyMask, hashCode, isDeflatedOnSerialization, isEmpty, isEnabled, keySet, put, put, put, put, putAll, remove, remove, remove, remove, setDeflatedOnSerialization, size, values, wtKeySet
 

Method Detail

getValueMask

public int getValueMask()
Get the key mask for the WTCollection of values in this map.

Supported API: true

Returns:
int

wtValues

public WTCollection wtValues()
Convenience method that returns the values in this map as a WTCollection. The resulting collection should be the same one that is returned by a call to values().

Supported API: true

Returns:
WTCollection

getPersistable

public Persistable getPersistable(Persistable key)
                           throws WTException
Get the value that maps to the given key as a Persistable. If the value is not inflated, then the map will inflate it. This may result in the inflation of all instances of the uninflated object's class.

Supported API: true

Parameters:
key -
Returns:
The inflated Persistable value
Throws:
WTException

getPersistable

public Persistable getPersistable(QueryKey key)
                           throws WTException
Get the value that maps to the given key as a Persistable. If the value is not inflated, then the map will inflate it. This may result in the inflation of all instances of the uninflated object's class.

Supported API: true

Parameters:
key -
Returns:
The inflated Persistable value
Throws:
WTException

getPersistable

public Persistable getPersistable(WTReference key)
                           throws WTException
Get the value that maps to the given key as a Persistable. If the value is not inflated, then the map will inflate it. This may result in the inflation of all instances of the uninflated object's class.

Supported API: true

Parameters:
key -
Returns:
The inflated Persistable value
Throws:
WTException

getQueryKey

public QueryKey getQueryKey(Persistable key)
Get the value that maps to the given key as a QueryKey. If the value is non-persisted, then returns null.

Supported API: true

Parameters:
key -
Returns:
null or the key

getQueryKey

public QueryKey getQueryKey(QueryKey key)
Get the value that maps to the given key as a QueryKey. If the value is non-persisted, then returns null.

Supported API: true

Parameters:
key -
Returns:
null or the key

getQueryKey

public QueryKey getQueryKey(WTReference key)
Get the value that maps to the given key as a QueryKey. If the value is non-persisted, then returns null.

Supported API: true

Parameters:
key -
Returns:
null or the key

getReference

public WTReference getReference(Persistable key)
Get the value that maps to the given key as a WTReference.

Supported API: true

Parameters:
key -
Returns:
WTReference

getReference

public WTReference getReference(QueryKey key)
Get the value that maps to the given key as a WTReference.

Supported API: true

Parameters:
key -
Returns:
WTReference

getReference

public WTReference getReference(WTReference key)
Get the value that maps to the given key as a WTReference.

Supported API: true

Parameters:
key -
Returns:
WTReference