@Override
    public boolean equals(Object obj) {
        return obj != null &&
                obj instanceof Token &&
                ((Token) obj).character == character &&
                ((Token) obj).type == type;
    }