/** @return the pois */ public Map<String, PointOfInterest> getPois() { if (this.pois == null || this.pois.isEmpty()) { Map<String, PointOfInterest> pois = new HashMap<String, PointOfInterest>(); for (MapLevel mapLevel : this.getLevels().values()) { for (NavigationNode navigationNode : mapLevel.getNavigationNodes().values()) { pois.putAll(navigationNode.getPois()); } } this.pois = pois; } return this.pois; }
public boolean isParent(NavigationNode node) { boolean result = false; if (node != null && node != this) { if (node.getParent() == this) { result = true; } else if (node.getParent() != null) { result = isParent(node.getParent()); } } return result; }
public boolean equals(Object other) { boolean result = this == other; if (!result && other instanceof NavigationNode && getClass().equals(other.getClass())) { NavigationNode otherNode = (NavigationNode) other; result = getId().equals(otherNode.getId()); if (result && !(getParent() == null && otherNode.getParent() == null)) { if (getParent() != null && otherNode.getParent() != null) { result = getParent().equals(otherNode.getParent()); } else { result = false; } } } return result; }
protected void copyCommonAttributes(NavigationNode node) { node.setEnabled(isEnabled()); node.setHidden(isHidden()); node.setI18n(getI18n()); node.setIcon(getIcon()); node.setPath(getPath()); node.setViewSuffix(getViewSuffix()); }