{
if (seqsel != null)
{
- for (SequenceI seq : seqsel.sequences)
- {
- sequences.addElement(seq);
- }
- sequences = new ArrayList<SequenceI>();
+ sequences.addAll(seqsel.sequences);
if (seqsel.groupName != null)
{
groupName = new String(seqsel.groupName);
{
SequenceGroup sgroup = new SequenceGroup(this);
SequenceI[] insect = getSequencesInOrder(alignment);
- sgroup.sequences = new Vector<SequenceI>();
- if (insect != null)
+ sgroup.sequences = new ArrayList<SequenceI>();
+ for (int s = 0; insect != null && s < insect.length; s++)
{
- if (map == null || map.containsKey(insect[s]))
+ for (SequenceI seq : insect)
{
- sgroup.sequences.add(insect[s]);
+ if (map == null || map.containsKey(seq))
+ {
- sgroup.sequences.addElement(seq);
- }
++ sgroup.sequences.add(insect[s]);
++ }
}
}
- // Enumeration en =getSequences(hashtable).elements();
- // while (en.hasMoreElements())
- // {
- // SequenceI elem = (SequenceI) en.nextElement();
- // if (alignment.getSequences().contains(elem))
- // {
- // sgroup.addSequence(elem, false);
- // }
- // }
return sgroup;
}