资源简介
代码片段和文件信息
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License Version 2.0
* (the “License“); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.util;
import java.io.IOException;
import java.io.InvalidobjectException;
import java.io.objectInputStream;
import java.io.objectOutputStream;
import java.io.objectStreamField;
import java.io.Serializable;
import libcore.util.objects;
/**
* HashMap is an implementation of {@link Map}. All optional operations are supported.
*
* All elements are permitted as keys or values including null.
*
*
Note that the iteration order for HashMap is non-deterministic. If you want
* deterministic iteration use {@link linkedHashMap}.
*
* Note: the implementation of {@code HashMap} is not synchronized.
* If one thread of several threads accessing an instance modifies the map
* structurally access to the map needs to be synchronized. A structural
* modification is an operation that adds or removes an entry. Changes in
* the value of an entry are not structural changes.
*
*
The {@code Iterator} created by calling the {@code iterator} method
* may throw a {@code ConcurrentModificationException} if the map is structurally
* changed while an iterator is used to iterate over the elements. Only the
* {@code remove} method that is provided by the iterator allows for removal of
* elements during iteration. It is not possible to guarantee that this
* mechanism works in all cases of unsynchronized concurrent modification. It
* should only be used for debugging purposes.
*
* @param the type of keys maintained by this map
* @param the type of mapped values
*/
public class HashMap extends AbstractMap implements Cloneable Serializable {
/**
* Min capacity (other than zero) for a HashMap. Must be a power of two
* greater than 1 (and less than 1 << 30).
* HashMap的最小容量
*/
private static final int MINIMUM_CAPACITY = 4;
/**
* Max capacity for a HashMap. Must be a power of two >= MINIMUM_CAPACITY.
* HashMap的最大容量
*/
private static final int MAXIMUM_CAPACITY = 1 << 30;
/**
* An empty table shared by all zero-capacity maps (typically from default
* constructor). It is never written to and replaced on first put. Its size
* is set to half the minimu
- 上一篇:javaweb简单留言版
- 下一篇:AndroidBLE聊天案例BLE服务端
相关资源
- 北大青鸟java第一单元项目迷你TXT小说
- 汉诺塔 迷宫用java实现,并且拥有可视
- JAVA 转C++工具
- 超市管理系统(Swing)
- java 内部排序算法的性能分析
- java web 简单留言板
- Eclipsejsp+MySQL 汽车销售信息管理系统
- (java源代码+详细注释)大富翁
- 管系统仿真与GPSSJAVA
- mysql-connector-java-5.1.6.zip
- 哲学家就餐:Java多线程图形版+java_
- 粗糙集属性约简java实现代码
- 消息中间件 RocketMQ 发布和订阅 Demo
- java解哲学家就餐问题
- javaidlb.jar
- 2016底 至 2017-01的最新整理达内Java视频
- Java心理测试小程序
- 仿百度搜索功能附带数据库 java+jsp
- 麻将游戏Java源码
- JMS简明教程创建消息 -> 发送消息 ->
- 坦克大战(java源码)288820
- mongodb-2.6.3.jar
- POJ 1328 java AC
- java课设学生成绩管理
- 物资管理系统 JAVA
- 网上在线订餐系统网站毕业设计论文
- Java实验-多态.docx
- 电脑配件管理系统java+SQL server
- Java简易计算器
- Calculator(Javafx).rar
评论
共有 条评论