Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * @param <K> the type of keys maintained by this map
- * @param <V> the type of mapped values
- *
- * @author Josh Bloch
- * @see HashMap
- * @see TreeMap
- * @see Hashtable
- * @see SortedMap
- * @see Collection
- * @see Set
- * @since 1.2
- */
- public interface Map<K,V> {
- // Query Operations
- /**
- * Returns the number of key-value mappings in this map. If the
- * map contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
- * <tt>Integer.MAX_VALUE</tt>.
- *
- * @return the number of key-value mappings in this map
- */
- int size();
- /**
- * Returns <tt>true</tt> if this map contains no key-value mappings.
- *
- * @return <tt>true</tt> if this map contains no key-value mappings
- */
- boolean isEmpty();
- /**
- * Retorna <tt>true</tt> si este diccionario contiene una definicion para
- * la clave especificada. Mas formalmente, retorna <tt>true</tt> si y solo
- * si este mapa contiene una definición para una clave <tt>k</tt> tal que
- * <tt> (clave == null ? k == null : clave.equals(k)) </tt>.
- *
- * @param key <completar>
- * @returns <completar>
- * @<completar> ClassCastException if the key is of an inappropriate type for
- * this map
- * @<completar> NullPointerException if the specified key is null and this map
- * does not permit null keys
- */
- boolean containsKey(Object key);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement