20 package net.sf.gridarta.model.archetypetype;
22 import java.util.Collections;
23 import java.util.Iterator;
24 import java.util.LinkedHashMap;
26 import org.jetbrains.annotations.NotNull;
56 final String sectionName = section.getSectionName();
58 if (existingSection != null) {
59 existingSection.
addAll(section);
63 archetypeAttributeSections.put(sectionName, section);
73 public Iterator<ArchetypeAttributeSection>
iterator() {
74 return Collections.unmodifiableMap(archetypeAttributeSections).values().iterator();
84 if (!archetypeAttributeSection.isEmpty()) {
98 if (archetypeAttributeSection.hasAttributeKey(key)) {
123 if (section == null) {
125 archetypeAttributeSections.put(sectionName, section);
boolean hasAttributeKey(@NotNull final Comparable< String > key)
Returns whether an attribute key is defined.
boolean hasAttribute()
Returns whether this archetype type defines at least one archetype attribute.
static final String GENERAL_SECTION
The name of the "General" section.
This Class contains the data of one archetype attribute.
ArchetypeAttributeSections()
Creates a new instance.
static final String SPECIAL_SECTION
The name of the "Special" section.
void addArchetypeAttribute(@NotNull final String sectionName, @NotNull final ArchetypeAttribute archetypeAttribute)
Adds an ArchetypeAttribute to this archetype type.
A set of ArchetypeAttributes.
void add(@NotNull final ArchetypeAttribute archetypeAttribute)
Adds an ArchetypeAttribute.
ArchetypeAttributeSection getOrCreateSection(final String sectionName)
Returns an ArchetypeAttributeSection by section name.
A list of ArchetypeAttributeSection instances.
Iterator< ArchetypeAttributeSection > iterator()
Returns a read-only Iterator returning all sections in display order.
final void addSection(@NotNull final ArchetypeAttributeSection section)
Adds an ArchetypeAttributeSection.
void addAll(@NotNull final ArchetypeAttributeSection archetypeAttributeSection)
Adds all ArchetypeAttributes of another archetype attributes to this archetype attributes.
final Map< String, ArchetypeAttributeSection > archetypeAttributeSections
All ArchetypeAttributeSections in display order.