Mercurial > jhg
diff 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 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/IntMap.java Tue Feb 19 21:35:09 2013 +0100 +++ b/src/org/tmatesoft/hg/internal/IntMap.java Wed Feb 20 18:19:52 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 TMate Software Ltd + * Copyright (c) 2011-2013 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ */ package org.tmatesoft.hg.internal; +import java.util.Arrays; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; @@ -127,6 +128,11 @@ } } + public void clear() { + Arrays.fill(values, 0, size, null); // do not keep the references + size = 0; + } + /** * Forget first N entries (in natural order) in the map. */