MCPcopy
hub / github.com/wangzheng0822/algo / rightShift

Method rightShift

java/06_linkedlist/LRUBasedArray.java:93–98  ·  view source on GitHub ↗

end左边的数据统一右移一位 @param end

(int end)

Source from the content-addressed store, hash-verified

91 * @param end
92 */
93 private void rightShift(int end) {
94 for (int i = end - 1; i >= 0; i--) {
95 value[i + 1] = value[i];
96 holder.put(value[i], i + 1);
97 }
98 }
99
100 public boolean isContain(T object) {
101 return holder.containsKey(object);

Callers 2

updateMethod · 0.95
cacheMethod · 0.95

Calls 1

putMethod · 0.45

Tested by

no test coverage detected