private final MatrixI jalviewMatrix;
- private Sequence[] sequences;
private final String[] identifiers;
final Sequence[] matrixSequences)
{
this.jalviewMatrix = jalviewInputMatrix;
- this.sequences = matrixSequences;
- this.identifiers = new String[sequences.length];
+ this.identifiers = new String[matrixSequences.length];
int i = 0;
- for (Sequence sequence : sequences)
+ for (Sequence sequence : matrixSequences)
{
identifiers[i] = sequence.getName();
i++;
try {
return IntStream.range(0, identifiers.length)
.filter(x -> identifier.equals(identifiers[x])).findAny()
- .getAsInt();
+ .getAsInt(); // stream to bypass otherwise having to duplicate the
+ // list
+ // with Arrays.aslist
}
catch (NoSuchElementException ex) {
throw new Error(MessageManager.formatMessage(