IndexedBases { boolean coreMatch(final int otherRefIndex, final byte[] otherBases) { int otherLeftCentreIndex = otherLeftCentreIndex(otherRefIndex); if (otherLeftCentreIndex < 0) { return false; } int otherRightCentreIndex = otherRightCentreIndex(otherRefIndex); if (otherRightCentreIndex >= otherBases.length) { return false; } for (int i = 0; i < centreLength(); i++) { if (bases[leftCoreIndex + i] != otherBases[otherLeftCentreIndex + i]) { return false; } } return true; } 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 testCoreMatch() { assertTrue(victim.coreMatch(5, "GATCTCCTCA".getBytes())); assertTrue(victim.coreMatch(1, "TCC".getBytes())); assertFalse(victim.coreMatch(1, "CCC".getBytes())); assertFalse(victim.coreMatch(1, "TTC".getBytes())); assertFalse(victim.coreMatch(1, "TCT".getBytes())); assertFalse(victim.coreMatch(1, "TC".getBytes())); assertFalse(victim.coreMatch(0, "CC".getBytes())); }