@Override
    public boolean equals(Object that) {
        if (this == that) return true;
        if (!(that instanceof StringTagging)) 
            return false;
        StringTagging thatTagging = (StringTagging) that;
        if (!characters().equals(thatTagging.characters())) 
            return false;
        if (size() != thatTagging.size())
            return false;
        for (int n = 0; n < size(); ++n) {
            if (!token(n).equals(thatTagging.token(n)))
                return false;
            if (!tag(n).equals(thatTagging.tag(n)))
                return false;
            if (tokenStart(n) != thatTagging.tokenStart(n))
                return false;
            if (tokenEnd(n) != thatTagging.tokenEnd(n))
                return false;
        }
        return true;
    }