public boolean check() {

    // System.out.println(" performing CHECK on " + getPayload(this));

    // System.out.println("[sequitur debug] *calling check() on* " + this.value + ", n isGuard: "
    // + n.isGuard());

    // ... Each time a link is made between two symbols if the new digram is repeated elsewhere
    // and the repetitions do not overlap, if the other occurrence is a complete rule,
    // replace the new digram with the non-terminal symbol that heads the rule,
    // otherwise,form a new rule and replace both digrams with the new non-terminal symbol
    // otherwise, insert the digram into the index...

    if (n.isGuard()) {
      // i am the rule
      return false;
    }

    if (!theDigrams.containsKey(this)) {
      // System.out.println("[sequitur debug] *check...* digrams contain this (" + this.value + "~"
      // + this.n.value + ")? NO. Checking in.");
      // found = theDigrams.put(this, this);
      theDigrams.put(this, this);
      // System.out.println(" *** Digrams now: " + makeDigramsTable());
      // System.out.println("[sequitur debug] *digrams* " + hash2String());
      return false;
    }

    // System.out.println("[sequitur debug] *check...* digrams contain this (" + this.value
    // + this.n.value + ")? Yes. Oh-Oh...");

    // well the same hash is in the store, lemme see...
    SAXSymbol found = theDigrams.get(this);

    // if it's not me, then lets call match magic?
    if (found.n != this) {
      // System.out.println("[sequitur debug] *double check...* IT IS NOT ME!");
      match(this, found);
    }

    return true;
  }
public boolean check ( ) { if ( n . isGuard ( ) ) { return false ; } if ( ! theDigrams . containsKey ( this ) ) { theDigrams . put ( this , this ) ; return false ; } SAXSymbol found = theDigrams . get ( this ) ; if ( found . n != this ) { match ( this , found ) ; } return true ; }
"Checks in" a new digram and enforce the digram uniqueness constraint. If it appears elsewhere,
deals with it by calling match(), otherwise inserts it into the hash table. Overwritten in
subclass guard.

@return true if it is not unique.