@Override public String toString() { return "{Patient [name= "+this.getName()+", lastName= "+this.getLastName()+"]}"; } }
@Override public String toString() { return "Artist {id= "+this.id+", name= '"+this.getName()+"', lastname= '"+this.getLastname()+"'}"; }
@Override public String toString() { return "Vehicle type: " + type + " year: " + year + " value: " + value + " " + insurance.toString(); }
@Override public String toString() { String result = "Song {title= '"+this.getTitle()+"', genre= '"+this.getGenre()+"', duration= '"+this.getDuration()+"', artists= ["; String separator = ""; for(int i = 0; i < this.artists.size(); i++){ result += separator+this.artists.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }
@Override public String toString() { String result = "Song {id= "+this.id+", name= '"+this.getName()+"', year= "+this.year+", genre= '"+this.getGenre()+"', duration= '"+this.getDuration()+"', artists= ["; String separator = ""; for(int i = 0; i < this.artists.size(); i++){ result += separator+this.artists.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }
@Override public String toString() { String result = "Playlist {name= '"+this.getName()+"', songs= ["; String separator = ""; for(int i = 0; i < this.songs.size(); i++){ result += separator+this.songs.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }
public boolean isLongerThan(int seconds){ System.out.println("Calculating playlist lenght"); int calculatedTime = 0; for (Song song : songs) { calculatedTime += song.getDuration(); if (calculatedTime > seconds){ return true; } } return false; }
@Override public String toString() { return "{Doctor [name= "+this.getName()+", lastName= "+this.getLastName()+", notifications= "+this.getNotifications().size()+"]}"; }
@Override public String toString() { return "{Nurse [name= "+this.getName()+", lastName= "+this.getLastName()+", notifications= "+this.getNotifications().size()+"]}"; }
public boolean containsSong(String songName){ System.out.println("Searching for a song named '"+songName+"'"); for (Song song : songs) { if (song.getTitle().equalsIgnoreCase(songName)){ return true; } } return false; }
public MeetingStartEvent(Meeting meeting) { this.meeting = meeting; this.duration = meeting.getDuration(); }
private void initAlerts(){ for (AlertType alertType : AlertType.values()) { alerts.put(alertType, new ArrayList<Alert>()); } }
@Override public String toString() { String result = "Song {id= "+this.id+", name= '"+this.getTitle()+"', year= "+this.year+", genre= '"+this.getGenre()+"', duration= '"+this.getDuration()+"', artists= ["; String separator = ""; for(int i = 0; i < this.artists.size(); i++){ result += separator+this.artists.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }
@Override public String toString() { return "Artist {id= "+this.id+", name= '"+this.getName()+"', lastname= '"+this.getLastname()+"'}"; }
@Override public String toString() { String result = "Playlist {id= "+this.id+", name= '"+this.getName()+"', songs= ["; String separator = ""; for(int i = 0; i < this.songs.size(); i++){ result += separator+this.songs.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }
public boolean isLongerThan(int seconds){ System.out.println("Calculating playlist lenght"); int calculatedTime = 0; for (Song song : songs) { calculatedTime += song.getDuration(); if (calculatedTime > seconds){ return true; } } return false; }
public void accumulate(Serializable context, Object value) { if (((Song)value).getTitle().contains("a")){ ((ContextData)context).songs.add((Song)value); } }
@Override public String toString() { return "Artist {name= '"+this.getName()+"', lastname= '"+this.getLastname()+"'}"; }
@Override public String toString() { String result = "Playlist {id= "+this.id+", name= '"+this.getName()+"', songs= ["; String separator = ""; for(int i = 0; i < this.songs.size(); i++){ result += separator+this.songs.get(i); if (i==0){ separator = ", "; } } return result+"]}"; }