comparison src/org/tmatesoft/hg/internal/IntMap.java @ 551:4ea0351ca878

Better (precise) name for diff facility, tests
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 20 Feb 2013 18:19:52 +0100
parents 7bcfbc255f48
children f41dd9a3b8af
comparison
equal deleted inserted replaced
550:c1478cc31f45 551:4ea0351ca878
1 /* 1 /*
2 * Copyright (c) 2011-2012 TMate Software Ltd 2 * Copyright (c) 2011-2013 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.internal; 17 package org.tmatesoft.hg.internal;
18 18
19 import java.util.Arrays;
19 import java.util.Iterator; 20 import java.util.Iterator;
20 import java.util.Map; 21 import java.util.Map;
21 import java.util.Map.Entry; 22 import java.util.Map.Entry;
22 import java.util.NoSuchElementException; 23 import java.util.NoSuchElementException;
23 24
125 keys[size] = 0; 126 keys[size] = 0;
126 values[size] = null; 127 values[size] = null;
127 } 128 }
128 } 129 }
129 130
131 public void clear() {
132 Arrays.fill(values, 0, size, null); // do not keep the references
133 size = 0;
134 }
135
130 /** 136 /**
131 * Forget first N entries (in natural order) in the map. 137 * Forget first N entries (in natural order) in the map.
132 */ 138 */
133 @Experimental 139 @Experimental
134 public void removeFromStart(int count) { 140 public void removeFromStart(int count) {