public MessageDialog getMessageDialogByTarget(String target) { for (MessageDialog m : messages) { if (m.getTarget().equalsIgnoreCase(target)) { return m; } } return null; }
public boolean hasMessage(String target) { for (MessageDialog m : messages) { if (m.getTarget().equalsIgnoreCase(target)) { return true; } } return false; }