code: @Override
    public boolean validateMaximum(BytesRef term) {
      if (morseBase == null) {
        return false;
      } else if (maximum == null) {
        return true;
      } else {
        double[][] state = _start();
        byte b0;
        String morse;
        char ch2 = 0x00;
        int i = term.offset + prefixOffset;
        for (; i < term.length; i++) {
          b0 = term.bytes[i];    
          if (b0 == 0x00) {
            break;
          }
          if (ALPHABET_MORSE.containsKey(b0)) {
            morse = ALPHABET_MORSE.get(b0)+" ";
            for (char ch1 : morse.toCharArray()) {            
              state = _step(state, ch1, ch2);
              if (!_can_match(state)) {
                return false;
              }
              ch2 = ch1;
            }
          } else {
            return false;
          }        
        }
        return _is_match(state);      
      }
    }
docs: /*
  (non-Javadoc)
  
  @see
  mtas.codec.util.distance.Distance#validate(org.apache.lucene.util.BytesRef)