package music;

/** Una canción: un valor inmutable. La duración va en segundos y es positiva. */
public record Song(String title, String artist, int seconds) {

    public Song {
        if (title == null || title.isBlank()) {
            throw new IllegalArgumentException("la canción necesita un título");
        }
        if (seconds <= 0) {
            throw new IllegalArgumentException("duración no positiva: " + seconds);
        }
    }
}
