Skip to content
Snippets Groups Projects
Commit fa6445eb authored by Andreas Bayha's avatar Andreas Bayha
Browse files

YELLOW

Issue-ref: 4349
Issue-URL: af3#4349



Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 5d913ead
No related branches found
No related tags found
1 merge request!2214349
Pipeline #39700 canceled
Pipeline: maven-releng

#39701

    ......@@ -8,7 +8,7 @@ LogMessage.java 14204ed9d51b356f50be52362247cfbbe0cbd5c7 GREEN
    ModelElementTransformationContext.java 5a41bd3a75ce434c3174d50d2fdfab28b66f09f2 GREEN
    ModelStorageError.java 2aef480044047e960e64811111a7f27310011cc2 GREEN
    Prototype.java f4b13f86b7511edacc138053ffb80cecbac70868 GREEN
    PrototypeCategory.java 46dd77d2481862c622e463a89cd3aae6bd3f2971 YELLOW
    PrototypeCategory.java 6aa849290948b1fd9608ad06d7cca2ec6ff76805 YELLOW
    TransformationProviderChain.java 67ec6d0b4c23d295323572649606d79f3b897437 GREEN
    TutorialAtomicStep.java 09c0d6597d542b431b5bbdc790ee9e533d9f77fb GREEN
    TutorialCompositeStep.java cc61c2e86eff310762acac4d023fd709507355c8 GREEN
    ......
    ......@@ -16,9 +16,9 @@
    package org.fortiss.tooling.kernel.extension.data;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    /**
    * Container object for prototypes of a certain category.
    ......@@ -39,8 +39,8 @@ public class PrototypeCategory {
    /** Stores the prototypes affiliated with this category. */
    private List<Prototype> children = new ArrayList<Prototype>();
    /** Stores the mapping of sub-category names to sub-categories for this category. */
    private Map<String, PrototypeCategory> subCategories = new HashMap<String, PrototypeCategory>();
    /** Stores the unique sub-categories of this category. */
    private Set<PrototypeCategory> subCategories = new HashSet<PrototypeCategory>();
    /** Constructor. */
    public PrototypeCategory(String category) {
    ......@@ -63,15 +63,9 @@ public class PrototypeCategory {
    children.add(prototype);
    }
    /**
    * Adds the given sub-category to this category. In case a sub-category of the same name already
    * exists, it will be replaced.
    *
    * @param subCat
    * The sub-{@link PrototypeCategory} to be added.
    */
    /** Adds sub-category. */
    public void add(PrototypeCategory subCat) {
    subCategories.put(subCat.getName(), subCat);
    subCategories.add(subCat);
    }
    /** Replaces an existing prototype with a new one. */
    ......@@ -86,7 +80,7 @@ public class PrototypeCategory {
    public Object[] getChildren() {
    List<Object> result = new ArrayList<Object>();
    result.addAll(children);
    result.addAll(subCategories.values());
    result.addAll(subCategories);
    return result.toArray();
    }
    ......@@ -110,4 +104,10 @@ public class PrototypeCategory {
    public String toString() {
    return "Prototype category: " + categoryName;
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
    return getName().hashCode();
    }
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment