Class WTKeyedHashMap

java.lang.Object
java.util.AbstractMap
wt.fc.collections.WTKeyedHashMap
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, Map, WTKeyedMap, ResultProcessor, Evolvable
Direct Known Subclasses:
WTValuedHashMap

public class WTKeyedHashMap extends AbstractMap implements Cloneable, WTKeyedMap, ResultProcessor, Evolvable
Follows the patterns established by the default collection implementations. The implementation of ResultProcessor.addElement(Object) uses the following algorithm:
  • If the object is a Persistable, puts it in the map with a null value
  • If the object is a 2-element array of Persistables, adds them as a key/value pair
  • If the object is a 2-element array of String,Number, then creates a QueryKey and puts it in the map with a null value
  • If the object is a 4-element array of String,Number,String,Number, then creates a QueryKey for each pair and adds them as a key/value pair

Note: this class is Evolvable. Remember: anything you put into the database needs to be able to come back out later (perhaps much later. You will especially want to think twice before blobbing this map because the values can be anything, including instances of classes you have no control over. See also other warnings related to evolvable collections (such as WTValuedHashMap's warning.

Supported API: true

Extendable: false

See Also:
  • Constructor Details

    • WTKeyedHashMap

      public WTKeyedHashMap()


      Supported API: true
    • WTKeyedHashMap

      public WTKeyedHashMap(int initial_capacity)


      Supported API: true
      Parameters:
      initial_capacity -
    • WTKeyedHashMap

      public WTKeyedHashMap(int initial_capacity, int key_mask)


      Supported API: true
      Parameters:
      initial_capacity -
      key_mask -
    • WTKeyedHashMap

      public WTKeyedHashMap(Map m)


      Supported API: true
      Parameters:
      m -
    • WTKeyedHashMap

      public WTKeyedHashMap(Map m, int key_mask)


      Supported API: true
      Parameters:
      m -
      key_mask -
  • Method Details

    • clone

      public Object clone()


      Supported API: true
      Overrides:
      clone in class AbstractMap
      Returns:
      Object
    • clone

      public WTKeyedHashMap clone(boolean deep)


      Supported API: true
      Parameters:
      deep -
      Returns:
      WTKeyedHashMap