public ImageResource getImageResource(long id) { for (ImageResource imgRes : this.getImageResources()) { if (imgRes.getId() == id) { return imgRes; } } return null; }
private boolean isNameAvailable(String name) { if (this.getLayerByName(name) != null) { return false; } if (this.getSceneByName(name) != null) { return false; } for (ImageResource imgRes : this.getImageResources()) { if (imgRes.getName(false).equals(name)) { return false; } if (imgRes.getSequenceByName(name) != null) { return false; } if (imgRes.getAnimatedTileByName(name) != null) { return false; } } return true; }