<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    dream.in.java

    能以不變應萬變是聰明人做事的準則。萬事從小事做起,積累小成功,問鼎大成功,是成功者的秘訣。

    Dictionary

      1 /*
      2  * Copyright 1995-2004 Sun Microsystems, Inc.  All rights reserved.
      3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
      4  *
      5  *
      6  *
      7  *
      8  *
      9  *
     10  *
     11  *
     12  *
     13  *
     14  *
     15  *
     16  *
     17  *
     18  *
     19  *
     20  *
     21  *
     22  *
     23  *
     24  */
     25 
     26 package java.util;
     27 
     28 /**
     29  * The <code>Dictionary</code> class is the abstract parent of any
     30  * class, such as <code>Hashtable</code>, which maps keys to values.
     31  * Every key and every value is an object. In any one <tt>Dictionary</tt>
     32  * object, every key is associated with at most one value. Given a
     33  * <tt>Dictionary</tt> and a key, the associated element can be looked up.
     34  * Any non-<code>null</code> object can be used as a key and as a value.
     35  * <p>
     36  * As a rule, the <code>equals</code> method should be used by
     37  * implementations of this class to decide if two keys are the same.
     38  * <p>
     39  * <strong>NOTE: This class is obsolete.  New implementations should
     40  * implement the Map interface, rather than extending this class.</strong>
     41  *
     42  * @author  unascribed
     43  * @see     java.util.Map
     44  * @see     java.lang.Object#equals(java.lang.Object)
     45  * @see     java.lang.Object#hashCode()
     46  * @see     java.util.Hashtable
     47  * @since   JDK1.0
     48  */
     49 public abstract
     50 class Dictionary<K,V> {
     51     /**
     52      * Sole constructor.  (For invocation by subclass constructors, typically
     53      * implicit.)
     54      */
     55     public Dictionary() {
     56     }
     57 
     58     /**
     59      * Returns the number of entries (distinct keys) in this dictionary.
     60      *
     61      * @return  the number of keys in this dictionary.
     62      */
     63     abstract public int size();
     64 
     65     /**
     66      * Tests if this dictionary maps no keys to value. The general contract
     67      * for the <tt>isEmpty</tt> method is that the result is true if and only
     68      * if this dictionary contains no entries.
     69      *
     70      * @return  <code>true</code> if this dictionary maps no keys to values;
     71      *          <code>false</code> otherwise.
     72      */
     73     abstract public boolean isEmpty();
     74 
     75     /**
     76      * Returns an enumeration of the keys in this dictionary. The general
     77      * contract for the keys method is that an <tt>Enumeration</tt> object
     78      * is returned that will generate all the keys for which this dictionary
     79      * contains entries.
     80      *
     81      * @return  an enumeration of the keys in this dictionary.
     82      * @see     java.util.Dictionary#elements()
     83      * @see     java.util.Enumeration
     84      */
     85     abstract public Enumeration<K> keys();
     86 
     87     /**
     88      * Returns an enumeration of the values in this dictionary. The general
     89      * contract for the <tt>elements</tt> method is that an
     90      * <tt>Enumeration</tt> is returned that will generate all the elements
     91      * contained in entries in this dictionary.
     92      *
     93      * @return  an enumeration of the values in this dictionary.
     94      * @see     java.util.Dictionary#keys()
     95      * @see     java.util.Enumeration
     96      */
     97     abstract public Enumeration<V> elements();
     98 
     99     /**
    100      * Returns the value to which the key is mapped in this dictionary.
    101      * The general contract for the <tt>isEmpty</tt> method is that if this
    102      * dictionary contains an entry for the specified key, the associated
    103      * value is returned; otherwise, <tt>null</tt> is returned.
    104      *
    105      * @return  the value to which the key is mapped in this dictionary;
    106      * @param   key   a key in this dictionary.
    107      *          <code>null</code> if the key is not mapped to any value in
    108      *          this dictionary.
    109      * @exception NullPointerException if the <tt>key</tt> is <tt>null</tt>.
    110      * @see     java.util.Dictionary#put(java.lang.Object, java.lang.Object)
    111      */
    112     abstract public V get(Object key);
    113 
    114     /**
    115      * Maps the specified <code>key</code> to the specified
    116      * <code>value</code> in this dictionary. Neither the key nor the
    117      * value can be <code>null</code>.
    118      * <p>
    119      * If this dictionary already contains an entry for the specified
    120      * <tt>key</tt>, the value already in this dictionary for that
    121      * <tt>key</tt> is returned, after modifying the entry to contain the
    122      *  new element. <p>If this dictionary does not already have an entry
    123      *  for the specified <tt>key</tt>, an entry is created for the
    124      *  specified <tt>key</tt> and <tt>value</tt>, and <tt>null</tt> is
    125      *  returned.
    126      * <p>
    127      * The <code>value</code> can be retrieved by calling the
    128      * <code>get</code> method with a <code>key</code> that is equal to
    129      * the original <code>key</code>.
    130      *
    131      * @param      key     the hashtable key.
    132      * @param      value   the value.
    133      * @return     the previous value to which the <code>key</code> was mapped
    134      *             in this dictionary, or <code>null</code> if the key did not
    135      *             have a previous mapping.
    136      * @exception  NullPointerException  if the <code>key</code> or
    137      *               <code>value</code> is <code>null</code>.
    138      * @see        java.lang.Object#equals(java.lang.Object)
    139      * @see        java.util.Dictionary#get(java.lang.Object)
    140      */
    141     abstract public V put(K key, V value);
    142 
    143     /**
    144      * Removes the <code>key</code> (and its corresponding
    145      * <code>value</code>) from this dictionary. This method does nothing
    146      * if the <code>key</code> is not in this dictionary.
    147      *
    148      * @param   key   the key that needs to be removed.
    149      * @return  the value to which the <code>key</code> had been mapped in this
    150      *          dictionary, or <code>null</code> if the key did not have a
    151      *          mapping.
    152      * @exception NullPointerException if <tt>key</tt> is <tt>null</tt>.
    153      */
    154     abstract public V remove(Object key);
    155 }
    156 

    posted on 2009-05-11 00:31 YXY 閱讀(197) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 国产h视频在线观看免费| a拍拍男女免费看全片| 免费看国产一级特黄aa大片| 亚洲avav天堂av在线网爱情| AV无码免费永久在线观看| 亚洲无限乱码一二三四区| 性xxxx视频播放免费| 亚洲免费观看在线视频| 成视频年人黄网站免费视频| 亚洲人成人网毛片在线播放| 久久WWW免费人成人片| 亚洲精品国产av成拍色拍| 永久在线毛片免费观看| 日韩在线视频免费| 亚洲精品高清无码视频| 久久免费国产精品一区二区| 亚洲图片在线观看| 国产va免费精品观看精品| 亚洲a∨无码一区二区| 亚洲日韩精品无码专区网站| 最近中文字幕免费大全| 亚洲黄色在线播放| 妞干网免费视频观看| 日韩一级片免费观看| 亚洲天天做日日做天天欢毛片 | 亚洲精品一二三区| 国产极品粉嫩泬免费观看| 国产免费久久精品丫丫| 亚洲麻豆精品果冻传媒| 永久免费无码网站在线观看| 国产免费A∨在线播放| 亚洲高清免费在线观看| 破了亲妺妺的处免费视频国产| gogo免费在线观看| 亚洲乱码在线播放| 中文字幕第一页亚洲| 巨波霸乳在线永久免费视频| 爱情岛亚洲论坛在线观看| 内射少妇36P亚洲区| 国产成人高清精品免费软件| 免费精品99久久国产综合精品|