Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.42 KB | None | 0 0
  1.  * @param <K> the type of keys maintained by this map
  2.  * @param <V> the type of mapped values
  3.  *
  4.  * @author  Josh Bloch
  5.  * @see HashMap
  6.  * @see TreeMap
  7.  * @see Hashtable
  8.  * @see SortedMap
  9.  * @see Collection
  10.  * @see Set
  11.  * @since 1.2
  12.  */
  13. public interface Map<K,V> {
  14.     // Query Operations
  15.  
  16.     /**
  17.      * Returns the number of key-value mappings in this map.  If the
  18.      * map contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
  19.      * <tt>Integer.MAX_VALUE</tt>.
  20.      *
  21.      * @return the number of key-value mappings in this map
  22.      */
  23.     int size();
  24.  
  25.     /**
  26.      * Returns <tt>true</tt> if this map contains no key-value mappings.
  27.      *
  28.      * @return <tt>true</tt> if this map contains no key-value mappings
  29.      */
  30.     boolean isEmpty();
  31.  
  32.     /**
  33.      * Retorna <tt>true</tt> si este diccionario contiene una definicion para
  34.      * la clave especificada. Mas formalmente, retorna <tt>true</tt> si y solo
  35.      * si este mapa contiene una definición para una clave <tt>k</tt> tal que
  36.      * <tt> (clave == null ? k == null : clave.equals(k)) </tt>.
  37.      *
  38.      * @param key <completar>
  39.      * @returns <completar>
  40.      * @<completar> ClassCastException if the key is of an inappropriate type for
  41.      *         this map
  42.      * @<completar> NullPointerException if the specified key is null and this map
  43.      *         does not permit null keys
  44.      */
  45.     boolean containsKey(Object key);
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement