Java Source Code: atman.common.HMapTBToTB


   1: package atman.common;
   2: 
   3: /*
   4:  * HMapTBToTB hashmap with
   5:  * key of type "TextBlock"
   6:  * and value of type "TextBlock"
   7:  * derived from
   8:  * hashMapKeyVal.jct by the template generator
   9:  */
  10: import atman.perform.TextBlock;
  11: 
  12: import java.io.*;
  13: import java.util.*;
  14: 
  15: public class HMapTBToTB
  16:	  {
  17:   HashMap hmap;
  18:
  19:   public HMapTBToTB()
  20:	     {
  21:      hmap = new HashMap();
  22:   }
  23:
  24:   public HMapTBToTB(int initialCapacity)
  25:	     {
  26:      hmap = new HashMap(initialCapacity);
  27:   }
  28:
  29:   public boolean containsKey(TextBlock key)
  30:	     {
  31:      return hmap.containsKey(key);
  32:   }
  33:
  34:   public boolean containsValue(TextBlock value)
  35:	     {
  36:      return hmap.containsValue(value);
  37:   }
  38:
  39:   public Set entrySet()
  40:	     {
  41:      return hmap.entrySet();
  42:   }
  43:
  44:   public TextBlock get(TextBlock key)
  45:	     {
  46:      return (TextBlock)hmap.get(key);
  47:   }
  48:
  49:   public boolean isEmpty()
  50:	     {
  51:      return hmap.isEmpty();
  52:   }
  53:
  54:   public Set keySet()
  55:	     {
  56:      return hmap.keySet();
  57:   }
  58:
  59:   public TextBlock put(TextBlock key, TextBlock value)
  60:	     {
  61:      return (TextBlock)hmap.put(key, value);
  62:   }
  63:
  64:   public TextBlock remove(TextBlock key)
  65:	     {
  66:      return (TextBlock)hmap.remove(key);
  67:   }
  68:
  69:   public int size()
  70:	     {
  71:      return hmap.size();
  72:   }
  73:
  74:   public Collection values()
  75:	     {
  76:      return hmap.values();
  77:   }
  78:};