* Map of reconstructed AlignFrame objects that appear to have come from
* SplitFrame objects (have a dna/protein complement view).
*/
- private Map<Viewport, AlignFrame> splitFrameCandidates = new HashMap<Viewport, AlignFrame>();
+ private Map<Viewport, AlignFrame> splitFrameCandidates = new HashMap<>();
/*
* Map from displayed rna structure models to their saved session state jar
* entry names
*/
- private Map<RnaModel, String> rnaSessions = new HashMap<RnaModel, String>();
+ private Map<RnaModel, String> rnaSessions = new HashMap<>();
/**
* create/return unique hash string for sq
{
if (seqsToIds == null)
{
- seqsToIds = new IdentityHashMap<SequenceI, String>();
+ seqsToIds = new IdentityHashMap<>();
}
if (seqRefIds == null)
{
- seqRefIds = new HashMap<String, SequenceI>();
+ seqRefIds = new HashMap<>();
}
if (incompleteSeqs == null)
{
- incompleteSeqs = new HashMap<String, SequenceI>();
+ incompleteSeqs = new HashMap<>();
}
if (frefedSequence == null)
{
- frefedSequence = new ArrayList<SeqFref>();
+ frefedSequence = new ArrayList<>();
}
}
* This maintains a map of viewports, the key being the seqSetId. Important to
* set historyItem and redoList for multiple views
*/
- Map<String, AlignViewport> viewportsAdded = new HashMap<String, AlignViewport>();
+ Map<String, AlignViewport> viewportsAdded = new HashMap<>();
- Map<String, AlignmentAnnotation> annotationIds = new HashMap<String, AlignmentAnnotation>();
+ Map<String, AlignmentAnnotation> annotationIds = new HashMap<>();
String uniqueSetSuffix = "";
*/
private void saveAllFrames(List<AlignFrame> frames, JarOutputStream jout)
{
- Hashtable<String, AlignFrame> dsses = new Hashtable<String, AlignFrame>();
+ Hashtable<String, AlignFrame> dsses = new Hashtable<>();
/*
* ensure cached data is clear before starting
// NOTE UTF-8 MUST BE USED FOR WRITING UNICODE CHARS
// //////////////////////////////////////////////////
- List<String> shortNames = new ArrayList<String>();
- List<String> viewIds = new ArrayList<String>();
+ List<String> shortNames = new ArrayList<>();
+ List<String> viewIds = new ArrayList<>();
// REVERSE ORDER
for (int i = frames.size() - 1; i > -1; i--)
{
FileOutputStream fos = new FileOutputStream(jarFile);
JarOutputStream jout = new JarOutputStream(fos);
- List<AlignFrame> frames = new ArrayList<AlignFrame>();
+ List<AlignFrame> frames = new ArrayList<>();
// resolve splitframes
if (af.getViewport().getCodingComplement() != null)
{
if (viewIds == null)
{
- viewIds = new ArrayList<String>();
+ viewIds = new ArrayList<>();
}
initSeqRefs();
- List<UserColourScheme> userColours = new ArrayList<UserColourScheme>();
+ List<UserColourScheme> userColours = new ArrayList<>();
AlignViewport av = ap.av;
ViewportRanges vpRanges = av.getRanges();
}
JSeq jseq;
- Set<String> calcIdSet = new HashSet<String>();
+ Set<String> calcIdSet = new HashSet<>();
// record the set of vamsas sequence XML POJO we create.
- HashMap<String, Sequence> vamsasSetIds = new HashMap<String, Sequence>();
+ HashMap<String, Sequence> vamsasSetIds = new HashMap<>();
// SAVE SEQUENCES
for (final SequenceI jds : rjal.getSequences())
{
pdb.setFile(matchedFile); // entry.getFile());
if (pdbfiles == null)
{
- pdbfiles = new ArrayList<String>();
+ pdbfiles = new ArrayList<>();
}
if (!pdbfiles.contains(pdbId))
/**
* store forward refs from an annotationRow to any groups
*/
- IdentityHashMap<SequenceGroup, String> groupRefs = new IdentityHashMap<SequenceGroup, String>();
+ IdentityHashMap<SequenceGroup, String> groupRefs = new IdentityHashMap<>();
if (storeDS)
{
for (SequenceI sq : jal.getSequences())
.getFeatureRenderer().getRenderOrder()
.toArray(new String[0]);
- Vector<String> settingsAdded = new Vector<String>();
+ Vector<String> settingsAdded = new Vector<>();
if (renderOrder != null)
{
for (String featureType : renderOrder)
// is groups actually supposed to be a map here ?
Iterator<String> en = ap.getSeqPanel().seqCanvas
.getFeatureRenderer().getFeatureGroups().iterator();
- Vector<String> groupsAdded = new Vector<String>();
+ Vector<String> groupsAdded = new Vector<>();
while (en.hasNext())
{
String grp = en.next();
{
jalview.datamodel.HiddenColumns hidden = av.getAlignment()
.getHiddenColumns();
- if (hidden == null || hidden.getHiddenRegions() == null)
+ if (hidden == null)
{
warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this.");
}
try
{
// create list to store references for any new Jmol viewers created
- newStructureViewers = new Vector<JalviewStructureDisplayI>();
+ newStructureViewers = new Vector<>();
// UNMARSHALLER SEEMS TO CLOSE JARINPUTSTREAM, MOST ANNOYING
// Workaround is to make sure caller implements the JarInputStreamProvider
// interface
initSeqRefs();
}
AlignFrame af = null, _af = null;
- IdentityHashMap<AlignmentI, AlignmentI> importedDatasets = new IdentityHashMap<AlignmentI, AlignmentI>();
- Map<String, AlignFrame> gatherToThisFrame = new HashMap<String, AlignFrame>();
+ IdentityHashMap<AlignmentI, AlignmentI> importedDatasets = new IdentityHashMap<>();
+ Map<String, AlignFrame> gatherToThisFrame = new HashMap<>();
final String file = jprovider.getFilename();
try
{
*/
protected void restoreSplitFrames()
{
- List<SplitFrame> gatherTo = new ArrayList<SplitFrame>();
- List<AlignFrame> addedToSplitFrames = new ArrayList<AlignFrame>();
- Map<String, AlignFrame> dna = new HashMap<String, AlignFrame>();
+ List<SplitFrame> gatherTo = new ArrayList<>();
+ List<AlignFrame> addedToSplitFrames = new ArrayList<>();
+ Map<String, AlignFrame> dna = new HashMap<>();
/*
* Identify the DNA alignments
errorMessage = null;
}
- Map<String, String> alreadyLoadedPDB = new HashMap<String, String>();
+ Map<String, String> alreadyLoadedPDB = new HashMap<>();
/**
* when set, local views will be updated from view stored in JalviewXML
List<SequenceI> hiddenSeqs = null;
- List<SequenceI> tmpseqs = new ArrayList<SequenceI>();
+ List<SequenceI> tmpseqs = new ArrayList<>();
boolean multipleView = false;
SequenceI referenceseqForView = null;
{
if (hiddenSeqs == null)
{
- hiddenSeqs = new ArrayList<SequenceI>();
+ hiddenSeqs = new ArrayList<>();
}
hiddenSeqs.add(tmpSeq);
// ////////////////////////////////
// LOAD ANNOTATIONS
- List<JvAnnotRow> autoAlan = new ArrayList<JvAnnotRow>();
+ List<JvAnnotRow> autoAlan = new ArrayList<>();
/*
* store any annotations which forward reference a group's ID
*/
- Map<String, List<AlignmentAnnotation>> groupAnnotRefs = new Hashtable<String, List<AlignmentAnnotation>>();
+ Map<String, List<AlignmentAnnotation>> groupAnnotRefs = new Hashtable<>();
if (vamsasSet.getAnnotationCount() > 0)
{
.get(an[i].getGroupRef());
if (aal == null)
{
- aal = new ArrayList<jalview.datamodel.AlignmentAnnotation>();
+ aal = new ArrayList<>();
groupAnnotRefs.put(an[i].getGroupRef(), aal);
}
aal.add(jaa);
}
int pidThreshold = jGroup.getPidThreshold();
- Vector<SequenceI> seqs = new Vector<SequenceI>();
+ Vector<SequenceI> seqs = new Vector<>();
for (int s = 0; s < jGroup.getSeqCount(); s++)
{
* Run through all PDB ids on the alignment, and collect mappings between
* distinct view ids and all sequences referring to that view.
*/
- Map<String, StructureViewerModel> structureViewers = new LinkedHashMap<String, StructureViewerModel>();
+ Map<String, StructureViewerModel> structureViewers = new LinkedHashMap<>();
for (int i = 0; i < jseqs.length; i++)
{
Set<Entry<File, StructureData>> fileData = data.getFileData()
.entrySet();
- List<PDBEntry> pdbs = new ArrayList<PDBEntry>();
- List<SequenceI[]> allseqs = new ArrayList<SequenceI[]>();
+ List<PDBEntry> pdbs = new ArrayList<>();
+ List<SequenceI[]> allseqs = new ArrayList<>();
for (Entry<File, StructureData> pdb : fileData)
{
String filePath = pdb.getValue().getFilePath();
getViewerJarEntryName(svattrib.getViewId()));
}
- List<String> pdbfilenames = new ArrayList<String>();
- List<SequenceI[]> seqmaps = new ArrayList<SequenceI[]>();
- List<String> pdbids = new ArrayList<String>();
+ List<String> pdbfilenames = new ArrayList<>();
+ List<SequenceI[]> seqmaps = new ArrayList<>();
+ List<String> pdbids = new ArrayList<>();
StringBuilder newFileLoc = new StringBuilder(64);
int cp = 0, ncp, ecp;
Map<File, StructureData> oldFiles = svattrib.getFileData();
af.viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
String[] renderOrder = new String[jms.getFeatureSettings()
.getSettingCount()];
- Map<String, FeatureColourI> featureColours = new Hashtable<String, FeatureColourI>();
- Map<String, Float> featureOrder = new Hashtable<String, Float>();
+ Map<String, FeatureColourI> featureColours = new Hashtable<>();
+ Map<String, Float> featureOrder = new Hashtable<>();
for (int fs = 0; fs < jms.getFeatureSettings().getSettingCount(); fs++)
{
fdi.setVisible(setting.getType());
}
}
- Map<String, Boolean> fgtable = new Hashtable<String, Boolean>();
+ Map<String, Boolean> fgtable = new Hashtable<>();
for (int gs = 0; gs < jms.getFeatureSettings().getGroupCount(); gs++)
{
Group grp = jms.getFeatureSettings().getGroup(gs);
String[] magicNames = new String[] { "Consensus", "Quality",
"Conservation" };
JvAnnotRow nullAnnot = new JvAnnotRow(-1, null);
- Hashtable<String, JvAnnotRow> visan = new Hashtable<String, JvAnnotRow>();
+ Hashtable<String, JvAnnotRow> visan = new Hashtable<>();
for (String nm : magicNames)
{
visan.put(nm, nullAnnot);
+ auan.template.getCalcId()), auan);
}
int hSize = al.getAlignmentAnnotation().length;
- List<JvAnnotRow> reorder = new ArrayList<JvAnnotRow>();
+ List<JvAnnotRow> reorder = new ArrayList<>();
// work through any autoCalculated annotation already on the view
// removing it if it should be placed in a different location on the
// annotation panel.
- List<String> remains = new ArrayList<String>(visan.keySet());
+ List<String> remains = new ArrayList<>(visan.keySet());
for (int h = 0; h < hSize; h++)
{
jalview.datamodel.AlignmentAnnotation jalan = al
{
if (datasetIds == null)
{
- datasetIds = new Hashtable<String, AlignmentI>();
+ datasetIds = new Hashtable<>();
return null;
}
if (datasetIds.containsKey(datasetId))
{
if (datasetIds == null)
{
- datasetIds = new Hashtable<String, AlignmentI>();
+ datasetIds = new Hashtable<>();
}
datasetIds.put(datasetId, dataset);
}
// make a new datasetId and record it
if (dataset2Ids == null)
{
- dataset2Ids = new IdentityHashMap<AlignmentI, String>();
+ dataset2Ids = new IdentityHashMap<>();
}
else
{
// register sequence object so the XML parser can recover it.
if (seqRefIds == null)
{
- seqRefIds = new HashMap<String, SequenceI>();
+ seqRefIds = new HashMap<>();
}
if (seqsToIds == null)
{
- seqsToIds = new IdentityHashMap<SequenceI, String>();
+ seqsToIds = new IdentityHashMap<>();
}
seqRefIds.put(jv2vobj.get(jvobj).toString(), (SequenceI) jvobj);
seqsToIds.put((SequenceI) jvobj, id);