public abstract Action getUndoAction();
};
- private List<Edit> edits = new ArrayList<Edit>();
+ private List<Edit> edits = new ArrayList<>();
String description;
// readd it to the alignment
if (command.alIndex[i] < command.al.getHeight())
{
- List<SequenceI> sequences;
- synchronized (sequences = command.al.getSequences())
+ List<SequenceI> sequences = command.al.getSequences();
+ synchronized (sequences)
{
if (!(command.alIndex[i] < 0))
{
if (modifyVisibility && !insert)
{
// only occurs if a sequence was added or deleted.
- command.deletedAnnotationRows = new Hashtable<SequenceI, AlignmentAnnotation[]>();
+ command.deletedAnnotationRows = new Hashtable<>();
}
if (command.fullAlignmentHeight)
{
if (!insert)
{
- command.deletedAnnotations = new Hashtable<String, Annotation[]>();
+ command.deletedAnnotations = new Hashtable<>();
}
int aSize;
return;
}
- List<SequenceFeature> oldsf = new ArrayList<SequenceFeature>();
+ List<SequenceFeature> oldsf = new ArrayList<>();
int cSize = j - i;
if (command.editedFeatures == null)
{
- command.editedFeatures = new Hashtable<SequenceI, List<SequenceFeature>>();
+ command.editedFeatures = new Hashtable<>();
}
command.editedFeatures.put(seq, oldsf);
*/
public Map<SequenceI, SequenceI> priorState(boolean forUndo)
{
- Map<SequenceI, SequenceI> result = new HashMap<SequenceI, SequenceI>();
+ Map<SequenceI, SequenceI> result = new HashMap<>();
if (getEdits() == null)
{
return result;
* Work backwards through the edit list, deriving the sequences before each
* was applied. The final result is the sequence set before any edits.
*/
- Iterator<Edit> editList = new ReverseListIterator<Edit>(getEdits());
+ Iterator<Edit> editList = new ReverseListIterator<>(getEdits());
while (editList.hasNext())
{
Edit oldEdit = editList.next();
}
else
{
- return new ReverseListIterator<Edit>(getEdits());
+ return new ReverseListIterator<>(getEdits());
}
}
}