package chords.expression;
import static chords.util.Escala.getNotaEscalaBemol;
import static chords.util.Escala.getNotaEscalaSustenido;
public class Exp7Dim extends Nota {
public Exp7Dim(Nota nota, String setdim) {
super(nota, setdim);
}
@Override
public boolean checaNota() {
return true;
}
@Override
public String getFormacaoDaNota() {
Nota notaBase = getNotaBase();
String setDimNota;
while (true) {
if (notaBase instanceof ExpNota || notaBase instanceof ExpSustenido) {
String nota = notaBase.getNota();
setDimNota = getNotaEscalaSustenido(nota, 9);
break;
} else if (notaBase instanceof ExpBemol) {
String nota = notaBase.getNota();
setDimNota = getNotaEscalaBemol(nota, 9);
break;
}
notaBase = notaBase.getNotaBase();
}
return getNotaBase().getFormacaoDaNota() + " - " + setDimNota;
}
}