if (alter != 0) {
if (alter != null) {
    public String toString ()    {        StringBuilder sb = new StringBuilder();        sb.append("{Note");        sb.append(" ")          .append(shape);        if (accidental != null) {            sb.append(" ")              .append(accidental);        }        if (isRest) {            sb.append(" ")              .append("rest");        }        if (alter != 0) {            sb.append(" alter=")              .append(alter);        }        sb.append(" pp=")          .append((int) Math.rint(pitchPosition));        sb.append("}");        return sb.toString();    }