boolean (@NotNull XmlElement element) { if (!element.name.equals(myTagName)) { return false; } String name = element.getAttributeValue(myNameAttribute); if (myNameAttribute.isEmpty()) { return name == null || name.equals(this.name); } else { return name != null && name.equals(this.name); } }