@Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!super.equals(obj))
            return false;
        if (getClass() != obj.getClass())
            return false;
        NoteOrRestOrChordToken other = (NoteOrRestOrChordToken) obj;
        if (Double.doubleToLongBits(length) != Double
                .doubleToLongBits(other.length))
            return false;
        if (type != other.type)
            return false;
        return true;
    }