SimpleAlignedSequence implements AlignedSequence<S, C> { @Override public C getCompoundAt(int alignmentIndex) { return alignmentIndex >= 1 && alignmentIndex <= length && isGap(alignmentIndex) ? getCompoundSet().getCompoundForString(gap) : original.getCompoundAt(getSequenceIndexAt(alignmentIndex)); } SimpleAlignedSequence(S original, List<Step> steps);  SimpleAlignedSequence(S original, List<Step> steps, int numBefore, int numAfter);  SimpleAlignedSequence(AlignedSequence<S, C> prev, List<Step> steps);  SimpleAlignedSequence(AlignedSequence<S, C> prev, List<Step> steps, int numBefore, int numAfter); @Override void clearCache(); @Override int getAlignmentIndexAt(int sequenceIndex); @Override Point getEnd(); @Override Location getLocationInAlignment(); @Override int getNumGaps(); @Override S getOriginalSequence(); @Override int getOverlapCount(); @Override int getSequenceIndexAt(int alignmentIndex); @Override Point getStart(); @Override boolean isCircular(); @Override boolean isGap(int alignmentIndex); @Override int countCompounds(C... compounds); @Override AccessionID getAccession(); @Override List<C> getAsList(); @Override C getCompoundAt(int alignmentIndex); @Override CompoundSet<C> getCompoundSet(); @Override int getIndexOf(C compound); @Override int getLastIndexOf(C compound); @Override int getLength(); @Override String getSequenceAsString(); @Override SequenceView<C> getSubSequence(Integer start, Integer end); @Override Iterator<C> iterator(); @Override String toString(); @Override //TODO Needs to implements SequenceView<C> getInverse();  }
@Test public void testGetCompoundAt() { assertEquals(global.getCompoundAt(1), cs.getCompoundForString("-")); assertEquals(global.getCompoundAt(2), cs.getCompoundForString("A")); assertEquals(global.getCompoundAt(3), cs.getCompoundForString("R")); assertEquals(global.getCompoundAt(4), cs.getCompoundForString("-")); assertEquals(global.getCompoundAt(5), cs.getCompoundForString("N")); assertEquals(global.getCompoundAt(6), cs.getCompoundForString("D")); assertEquals(global.getCompoundAt(7), cs.getCompoundForString("-")); assertEquals(global.getCompoundAt(1), cs.getCompoundForString("-")); assertEquals(local.getCompoundAt(1), cs.getCompoundForString("E")); assertEquals(local.getCompoundAt(2), cs.getCompoundForString("Q")); assertEquals(local.getCompoundAt(3), cs.getCompoundForString("-")); assertEquals(local.getCompoundAt(4), cs.getCompoundForString("-")); assertEquals(local.getCompoundAt(5), cs.getCompoundForString("G")); assertEquals(local.getCompoundAt(6), cs.getCompoundForString("-")); assertEquals(local.getCompoundAt(7), cs.getCompoundForString("H")); assertEquals(local.getCompoundAt(8), cs.getCompoundForString("I")); assertEquals(local2.getCompoundAt(1), cs.getCompoundForString("R")); assertEquals(local2.getCompoundAt(2), cs.getCompoundForString("N")); assertEquals(local2.getCompoundAt(3), cs.getCompoundForString("D")); }