예제 #1
0
 @Override
 public boolean integrity() {
   Exam.assertTrue(1 <= mStart);
   Exam.assertTrue(mStart <= mEnd);
   Exam.assertNotNull(mPatterns);
   Exam.assertTrue(mPatterns.length() > 1);
   Exam.assertTrue(mCount >= 1);
   if (mEnd > mStart) {
     Exam.assertTrue(mCount > 1);
   }
   return true;
 }
예제 #2
0
 /**
  * Extend the block if it can be done and keep consistent phasing. Update the block phasing
  * pattern if successful.
  *
  * @param family containing a set of calls.
  * @return true iff the block was successfully extended.
  */
 boolean extend(final FamilyGt family) {
   final int length = family.length();
   assert length == mPatterns.length();
   assert family.posn() > mEnd;
   assert mSeq.equals(family.seq());
   final PatternArray pattern = family.pattern();
   for (int f = 0; f < Pattern.NUMBER_FLIPS; f++) {
     final PatternArray pat = mPatterns.flipIntersect(pattern, f);
     if (pat != null) {
       mPatterns = pat;
       mEnd = family.posn();
       mCount++;
       return true;
     }
   }
   return false;
 }