91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 35KB
    文件類型: .java
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-04
  • 語言: Java
  • 標簽: Java??HashMap??Java源碼??

資源簡介

HashMap源碼(JDK1.7,含注釋)

資源截圖

代碼片段和文件信息

/*
?*??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?<?????*?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?<
????/**
?????*?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


評論

共有 條評論