Package java.util

Examples of java.util.LinkedHashSet$MyIterator


    /**
     * @see org.andromda.metafacades.uml.ClassifierFacade#getInterfaceAbstractions()
     */
    protected Collection handleGetInterfaceAbstractions()
    {
        final Collection interfaceAbstractions = new LinkedHashSet();
        if (this.getAbstractions() != null)
        {
            for (Iterator abstractionIterator = this.getAbstractions().iterator(); abstractionIterator.hasNext();)
            {
                final DependencyFacade abstraction = (DependencyFacade)abstractionIterator.next();
                final ModelElementFacade element = abstraction.getTargetElement();

                if (element instanceof ClassifierFacade)
                {
                    final ClassifierFacade classifier = (ClassifierFacade)element;
                    if (classifier.isInterface())
                    {
                        interfaceAbstractions.add(classifier);
                    }
                }
            }
        }

View Full Code Here


        return AssociationClass.class.isAssignableFrom(this.metaObject.getClass());
    }

    protected Collection handleGetAssociatedClasses()
    {
        final Set associatedClasses = new LinkedHashSet();

        final List associationEnds = this.getAssociationEnds();
        for (int i = 0; i < associationEnds.size(); i++)
        {
            final AssociationEndFacade associationEndFacade = (AssociationEndFacade)associationEnds.get(i);
            associatedClasses.add(associationEndFacade.getOtherEnd().getType());
        }

        return associatedClasses;
    }
View Full Code Here

        return associatedClasses;
    }

    protected Collection handleGetAllAssociatedClasses()
    {
        final Set associatedClasses = new LinkedHashSet();
        associatedClasses.addAll(this.getAssociatedClasses());
        for (Iterator parentIterator = this.getGeneralizations().iterator(); parentIterator.hasNext();)
        {
            final ClassifierFacade parent = (ClassifierFacade)parentIterator.next();
            associatedClasses.addAll(parent.getAllAssociatedClasses());
        }

        return associatedClasses;
    }
View Full Code Here

        {
            operations = ((org.eclipse.uml2.Class)this.metaObject).getOwnedOperations();
        }
        else if (this.metaObject instanceof org.eclipse.uml2.Interface)
        {
            operations = new LinkedHashSet(((org.eclipse.uml2.Interface)this.metaObject).getOwnedOperations());
        }
        else
        {
            operations = Collections.EMPTY_LIST;
        }
View Full Code Here

    {
        final Collection operations;

        if (this.metaObject instanceof org.eclipse.uml2.Class)
        {
            operations = new LinkedHashSet(((org.eclipse.uml2.Class)this.metaObject).getOwnedOperations());

            final Collection dependencies = new FilteredCollection(this.metaObject.getClientDependencies())
            {
                public boolean evaluate(Object object)
                {
                    return object instanceof Abstraction;
                }
            };

            for (Iterator abstractionIterator = dependencies.iterator(); abstractionIterator.hasNext();)
            {
                final Abstraction abstraction = (Abstraction)abstractionIterator.next();
                final List suppliers = abstraction.getSuppliers();
                for (int i = 0; i < suppliers.size(); i++)
                {
                    final Object supplierObject = suppliers.get(i);
                    if (supplierObject instanceof Interface)
                    {
                        operations.addAll(resolveInterfaceOperationsRecursively((Interface)supplierObject));
                    }
                }
            }
        }
        else if (this.metaObject instanceof org.eclipse.uml2.Interface)
        {
            operations = new LinkedHashSet(((org.eclipse.uml2.Interface)this.metaObject).getOwnedOperations());
        }
        else
        {
            operations = Collections.EMPTY_LIST;
        }
View Full Code Here

        return StringUtils.replace(this.getManageablePackageName(), this.getNamespaceSeparator(), "/");
    }

    protected java.util.List handleGetManageableAssociationEnds()
    {
        final Set manageableAssociationEnds = new LinkedHashSet();// linked hashset to guarantee ordering wo/ duplicates
        collectAssociationEnds(manageableAssociationEnds, this);
        return new ArrayList(manageableAssociationEnds);
    }
View Full Code Here

    }


    private static Collection resolveInterfaceOperationsRecursively(Interface classifier)
    {
        final Collection operations = new LinkedHashSet(classifier.getOwnedOperations());   // preserve ordering

        final List generals = classifier.getGenerals();
        for (int i = 0; i < generals.size(); i++)
        {
            final Object generalObject = generals.get(i);
            if (generalObject instanceof Interface)
            {
                operations.addAll(resolveInterfaceOperationsRecursively((Interface)generalObject));
            }
        }

        return operations;
    }
View Full Code Here

            UMLMetafacadeProperties.ENABLE_MANAGEABLE_ENTITIES)).booleanValue();
    }

    protected java.util.List handleGetReferencingManageables()
    {
        final Set referencingManageables = new LinkedHashSet();
        final Collection associationEnds = getAssociationEnds();
        for (final Iterator associationEndIterator = associationEnds.iterator(); associationEndIterator.hasNext();)
        {
            final AssociationEndFacade associationEnd = (AssociationEndFacade)associationEndIterator.next();

            if (associationEnd.isNavigable())
            {
                if (associationEnd.isMany() || (associationEnd.isOne2One() && associationEnd.isChild()))
                {
                    final Object otherEndType = associationEnd.getOtherEnd().getType();
                    if (otherEndType instanceof Entity)
                    {
                        referencingManageables.add(otherEndType);
                    }
                }
            }
        }
        return new ArrayList(referencingManageables);
View Full Code Here

        return this.metaObject.isLeaf();
    }

    protected Collection handleGetInterfaceAbstractions()
    {
        final Collection interfaceAbstractions = new LinkedHashSet();
        if (this.getAbstractions() != null)
        {
            for (Iterator abstractionIterator = this.getAbstractions().iterator(); abstractionIterator.hasNext();)
            {
                final DependencyFacade abstraction = (DependencyFacade)abstractionIterator.next();
                final ModelElementFacade element = abstraction.getTargetElement();

                if (element instanceof ClassifierFacade)
                {
                    final ClassifierFacade classifier = (ClassifierFacade)element;
                    if (classifier.isInterface())
                    {
                        interfaceAbstractions.add(classifier);
                    }
                }
            }
        }
View Full Code Here

        return displayAttribute;
    }

    protected java.util.List handleGetUsers()
    {
        final Set users = new LinkedHashSet();

        final Collection dependencies = getTargetDependencies();
        for (final Iterator dependencyIterator = dependencies.iterator(); dependencyIterator.hasNext();)
        {
            final DependencyFacade dependency = (DependencyFacade)dependencyIterator.next();
            final Object dependencyObject = dependency.getSourceElement();

            if (!users.contains(dependencyObject) && dependencyObject instanceof ActorFacade)
            {
                collectActors((ActorFacade)dependencyObject, users);
            }
        }
View Full Code Here

TOP

Related Classes of java.util.LinkedHashSet$MyIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.