/** * Checks whether this object contains a given {@link Wallboard} instance. * * @param wallboard the {@link Wallboard} instance to search for * @return true, if the {@link Wallboard} exists, false otherwise */ public synchronized boolean containsWallboard(Wallboard wallboard) { return m_wallboards.getWallboards().contains(wallboard); }
/** * Method to return the {@link BeanItemContainer} associated with this object. * * @return the {@link BeanItemContainer} */ public BeanItemContainer<Wallboard> getBeanContainer() { return new BeanItemContainer<Wallboard>(Wallboard.class, m_wallboards.getWallboards()); }
/** * Checks whether this object contains {@link Wallboard} data concerning the given title. * * @param title the title to search for * @return true, if a {@link Wallboard} with the given title exists, false otherwise */ public synchronized boolean containsWallboard(String title) { for (Wallboard wallboard : m_wallboards.getWallboards()) { if (wallboard.getTitle().equals(title)) { return true; } } return false; }
/** * Returns the {@link Wallboard} for the given title. * * @param title the title to search for * @return the {@link Wallboard} instance if found, null otherwise */ public synchronized Wallboard getWallboard(String title) { for (Wallboard wallboard : m_wallboards.getWallboards()) { if (wallboard.getTitle().equals(title)) { return wallboard; } } return null; }
/** * This method adds a {@link Wallboard} to this provider. * * @param wallboard the {@link Wallboard} instance to be added */ public synchronized void addWallboard(Wallboard wallboard) { if (m_wallboards == null) { load(); } m_wallboards.getWallboards().add(wallboard); save(); }
/** * This method removes a {@link Wallboard} from this provider. * * @param wallboard the {@link Wallboard} instance to be removed */ public synchronized void removeWallboard(Wallboard wallboard) { if (m_wallboards == null) { load(); } m_wallboards.getWallboards().remove(wallboard); save(); } }