Alignments { static boolean isMatchSymbol(final Symbol symbol) { if (!(symbol instanceof BasisSymbol)) { return false; } BasisSymbol basisSymbol = (BasisSymbol) symbol; Set<Symbol> uniqueSymbols = new HashSet<Symbol>(); for (Object o : basisSymbol.getSymbols()) { Symbol s = (Symbol) o; if (isGapSymbol(s)) { return false; } uniqueSymbols.add((Symbol) o); } return (uniqueSymbols.size() == 1); } private  Alignments(); static long length(final Range<Long> range); static List<Long> lengths(final Iterable<Range<Long>> ranges); static long length(final Iterable<Range<Long>> ranges); static long maximumLength(final Iterable<Range<Long>> ranges); static int count(final Iterable<Range<Long>> ranges); static List<Long> starts(final Iterable<Range<Long>> ranges); static List<Long> ends(final Iterable<Range<Long>> ranges); static List<Range<Long>> gaps(final GappedSymbolList gappedSymbols); static List<Range<Long>> matches(final AlignmentPair alignmentPair); static List<Range<Long>> mismatches(final AlignmentPair alignmentPair);  }
@Test public void testIsMatchSymbolNull() { assertFalse(isMatchSymbol(null)); }
@Test public void testIsMatchSymbolGapSymbol() { assertFalse(isMatchSymbol(DNATools.getDNA().getGapSymbol())); }
@Test public void testIsMatchSymbol() { assertTrue(isMatchSymbol(alignmentPair.symbolAt(1))); assertFalse(isMatchSymbol(alignmentPair.symbolAt(5))); assertFalse(isMatchSymbol(alignmentPair.symbolAt(13))); }