From 968af817beecb629eb8bb0c34901e3080bcd9794 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 30 Aug 2017 17:48:55 +0100 Subject: [PATCH] JAL-2694 formatting --- .../structure/StructureSelectionManager.java | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 83a055e..9020ed4 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -66,7 +66,7 @@ public class StructureSelectionManager static IdentityHashMap instances; - private List mappings = new ArrayList(); + private List mappings = new ArrayList<>(); private boolean processSecondaryStructure = false; @@ -83,11 +83,11 @@ public class StructureSelectionManager /* * Set of any registered mappings between (dataset) sequences. */ - private List seqmappings = new ArrayList(); + private List seqmappings = new ArrayList<>(); - private List commandListeners = new ArrayList(); + private List commandListeners = new ArrayList<>(); - private List sel_listeners = new ArrayList(); + private List sel_listeners = new ArrayList<>(); /** * @return true if will try to use external services for processing secondary @@ -175,9 +175,9 @@ public class StructureSelectionManager * map between the PDB IDs (or structure identifiers) used by Jalview and the * absolute filenames for PDB data that corresponds to it */ - Map pdbIdFileName = new HashMap(); + Map pdbIdFileName = new HashMap<>(); - Map pdbFileNameId = new HashMap(); + Map pdbFileNameId = new HashMap<>(); public void registerPDBFile(String idForFile, String absoluteFile) { @@ -228,7 +228,7 @@ public class StructureSelectionManager } if (instances == null) { - instances = new java.util.IdentityHashMap(); + instances = new java.util.IdentityHashMap<>(); } StructureSelectionManager instance = instances.get(context); if (instance == null) @@ -724,7 +724,7 @@ public class StructureSelectionManager .getMappingFromS1(false); maxChain.transferRESNUMFeatures(seq, null); - HashMap mapping = new HashMap(); + HashMap mapping = new HashMap<>(); int resNum = -10000; int index = 0; char insCode = ' '; @@ -780,7 +780,7 @@ public class StructureSelectionManager * Remove mappings to the closed listener's PDB files, but first check if * another listener is still interested */ - List pdbs = new ArrayList(Arrays.asList(pdbfiles)); + List pdbs = new ArrayList<>(Arrays.asList(pdbfiles)); StructureListener sl; for (int i = 0; i < listeners.size(); i++) @@ -801,7 +801,7 @@ public class StructureSelectionManager */ if (pdbs.size() > 0) { - List tmp = new ArrayList(); + List tmp = new ArrayList<>(); for (StructureMapping sm : mappings) { if (!pdbs.contains(sm.pdbfile)) @@ -995,7 +995,7 @@ public class StructureSelectionManager return; } int atomNo; - List atoms = new ArrayList(); + List atoms = new ArrayList<>(); for (StructureMapping sm : mappings) { if (sm.sequence == seq || sm.sequence == seq.getDatasetSequence() @@ -1103,7 +1103,7 @@ public class StructureSelectionManager public StructureMapping[] getMapping(String pdbfile) { - List tmp = new ArrayList(); + List tmp = new ArrayList<>(); for (StructureMapping sm : mappings) { if (sm.pdbfile.equals(pdbfile)) @@ -1263,7 +1263,7 @@ public class StructureSelectionManager } } - Vector view_listeners = new Vector(); + Vector view_listeners = new Vector<>(); public synchronized void sendViewPosition( jalview.api.AlignmentViewPanel source, int startRes, int endRes, -- 1.7.10.2