class SequenceMatcher {

    public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) {
        Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName);
        WilmaSequence result = null;
        for (int i = 0; i < sequenceIds.length && result == null; i++) {
            String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]);
            result = sequences.get(actualKey);
        }
        return result;
    }

}