code: @Override
      public void reset() {
          // reset is setting the attributes that are already in
          // string search, hence all attributes in the collator should
          // be retrieved without any problems
  
          boolean sameCollAttribute = true;
          int ceMask;
          boolean shift;
          int varTop;
  
          // **** hack to deal w/ how processed CEs encode quaternary ****
          int newStrength = collator_.getStrength();
          if ((strength_ < Collator.QUATERNARY && newStrength >= Collator.QUATERNARY)
                  || (strength_ >= Collator.QUATERNARY && newStrength < Collator.QUATERNARY)) {
              sameCollAttribute = false;
          }
  
          strength_ = collator_.getStrength();
          ceMask = getMask(strength_);
          if (ceMask_ != ceMask) {
              ceMask_ = ceMask;
              sameCollAttribute = false;
          }
  
          shift = collator_.isAlternateHandlingShifted();
          if (toShift_ != shift) {
              toShift_ = shift;
              sameCollAttribute = false;
          }
  
          varTop = collator_.getVariableTop();
          if (variableTop_ != varTop) {
              variableTop_ = varTop;
              sameCollAttribute = false;
          }
  
          if (!sameCollAttribute) {
              initialize();
          }
  
          textIter_.setText(search_.text());
  
          search_.setMatchedLength(0);
          search_.matchedIndex_ = DONE;
          search_.isOverlap_ = false;
          search_.isCanonicalMatch_ = false;
          search_.elementComparisonType_ = ElementComparisonType.STANDARD_ELEMENT_COMPARISON;
          search_.isForwardSearching_ = true;
          search_.reset_ = true;
      }
docs: {@inheritDoc}