IndexedBases { public int maxFlankLength() { return Math.min(leftCoreIndex, bases.length - rightCoreIndex - 1); } IndexedBases(final int position, final int index, final byte[] bases);  IndexedBases(final int position, final int index, final int leftCoreIndex, int rightCoreIndex, int flankSize,
            final byte[] bases); @NotNull static IndexedBases resize(final int position, final int recordIndex, final int recordLeftCoreIndex,
            final int recordRightCoreIndex, final int flankSize, final int additionalFlank, final byte[] recordBases); boolean phased(int offset, @NotNull final IndexedBases other); boolean isCentreCovered(int otherReadIndex, byte[] otherBases); @NotNull ReadContextMatch matchAtPosition(@NotNull final IndexedBases other); @NotNull ReadContextMatch matchAtPosition(int otherReadIndex, byte[] otherBases); @NotNull ReadContextMatch matchAtPosition(int otherReadIndex, int otherLength, byte[] otherBases); @NotNull String centerString(); @Override String toString(); int flankSize(); int index(); int index(int position); byte[] bases(); int leftCentreIndex(); int rightCentreIndex(); int position(); int leftFlankIndex(); int rightFlankIndex(); byte base(int position); int maxFlankLength(); byte[] trinucleotideContext(int position);  }
@Test public void testMaxFlankLength() { IndexedBases constrainedOnLeft = new IndexedBases(1000, 5, 2, 6, 3, "GATCTCCTCA".getBytes()); IndexedBases constrainedOnRight = new IndexedBases(1000, 5, 4, 6, 3, "GATCTCCTCA".getBytes()); assertEquals(2, constrainedOnLeft.maxFlankLength()); assertEquals(3, constrainedOnRight.maxFlankLength()); }