/** * Returned the entity with given name. * * @param p_name * @return element */ public SpriteEntity getNamedEntity(String p_name) { if (p_name != null && !"".equals(p_name)) { for (SpriteEntity p : mergedEntities) { if (p_name.equalsIgnoreCase(p.getName())) { return p; } } } return null; }
/** * Returned the element with given name. * * @param p_name * @return element */ public Element getNamedElement(String p_name) { if (p_name != null && !"".equals(p_name)) { for (SpriteEntity p : mergedEntities) { if (p.getEntityType() == EntityType.ELEMENT && p_name.equalsIgnoreCase(p.getName())) { return (Element) p; } } } return null; }