标签:不用 padding public 接口 ble cap his 循环 sync
1
2
3
|
public synchronized void addElement(E obj) { modCount++;
ensureCapacityHelper(elementCount + 1); elementData[elementCount++] = obj;
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
public V put(K key, V value) {
if (key == null)
return
putForNullKey(value);
int hash = hash(key.hashCode());
int i = indexFor(hash, table.length);
for(Entry<K,V> e = table[i]; e != null; e = e.next) {
Object k;
if (e.hash == hash &&((k = e.key) == key || key.equals(k))) {
V oldValue = e.value;
e.value = value;
e.recordAccess(this);
return
oldValue; }
}
modCount++;
addEntry(hash, key, value, i);
return null;
}
|
1
2
3
4
5
|
public boolean add(E e) {
ensureCapacity(size + 1); // Increments modCount!!
elementData[size++] = e;
return true;
}
|
1
2
3
4
5
|
public synchronized
StringBuffer append(String str) {
super.append(str);
return this;
}
|
1
2
3
4
5
|
public synchronized
Object setProperty(String key, String value) {
return
put(key, value);
}
|
标签:不用 padding public 接口 ble cap his 循环 sync
原文地址:https://www.cnblogs.com/ygria/p/9617226.html