Mercurial > hg4j
changeset 279:23e3ea855097
Use EnumMap when keys are from enumeration
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 31 Aug 2011 23:22:18 +0200 |
parents | 55fad5e0e98b |
children | 35125450c804 |
files | cmdline/org/tmatesoft/hg/console/Status.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Status.java Mon Aug 29 23:31:37 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Status.java Wed Aug 31 23:22:18 2011 +0200 @@ -20,11 +20,11 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.EnumMap; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.TreeMap; import org.tmatesoft.hg.core.HgRepoFacade; import org.tmatesoft.hg.core.HgStatus; @@ -65,7 +65,7 @@ final boolean showCopies = cmdLineOpts.getBoolean("-C", "--copies"); class StatusHandler implements HgStatusCommand.Handler { - final Map<HgStatus.Kind, List<Path>> data = new TreeMap<HgStatus.Kind, List<Path>>(); + final EnumMap<HgStatus.Kind, List<Path>> data = new EnumMap<HgStatus.Kind, List<Path>>(HgStatus.Kind.class); final Map<Path, Path> copies = showCopies ? new HashMap<Path,Path>() : null; public void handleStatus(HgStatus s) {