Examples of LinkedHashSet


Examples of java.util.LinkedHashSet

    /**
     * @see org.andromda.metafacades.uml.Service#getMessagingDestinations()
     */
    protected Collection handleGetMessagingDestinations()
    {
        final Set destinations = new LinkedHashSet();
        CollectionUtils.forAllDo(this.getOperations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof ServiceOperation)
                {
                    final ServiceOperation operation = (ServiceOperation)object;
                    if (operation.isIncomingMessageOperation())
                    {
                        destinations.add(operation.getIncomingDestination());
                    }
                    else if (operation.isOutgoingMessageOperation())
                    {
                        destinations.add(operation.getOutgoingDestination());
                    }
                }
            }
        });
        return destinations;
View Full Code Here

Examples of java.util.LinkedHashSet

    /**
     * @see org.andromda.metafacades.uml.Service#getAllEntityReferences()
     */
    protected Collection handleGetAllEntityReferences()
    {
        final Collection result = new LinkedHashSet();

        // get references of the service itself
        result.addAll(this.getEntityReferences());

        // get references of all super classes
        CollectionUtils.forAllDo(this.getAllGeneralizations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof Service)
                {
                    final Service service = (Service)object;
                    result.addAll(service.getEntityReferences());
                }
            }
        });
        return result;
    }
View Full Code Here

Examples of java.util.LinkedHashSet

    /**
     * @see org.andromda.metafacades.uml.Service#getAllMessagingDestinations()
     */
    protected Collection handleGetAllMessagingDestinations()
    {
        final Collection result = new LinkedHashSet();

        // get references of the service itself
        result.addAll(this.getMessagingDestinations());

        // get references of all super classes
        CollectionUtils.forAllDo(this.getAllGeneralizations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof Service)
                {
                    final Service service = (Service)object;
                    result.addAll(service.getMessagingDestinations());
                }
            }
        });
        return result;
    }
View Full Code Here

Examples of java.util.LinkedHashSet

            "/");
    }

    protected java.util.List handleGetManageableAssociationEnds()
    {
        final Set manageableAssociationEnds = new LinkedHashSet(); // linked

        // hashset
        // to
        // guarantee
        // ordering
View Full Code Here

Examples of java.util.LinkedHashSet

                      .booleanValue();
    }

    protected java.util.List handleGetReferencingManageables()
    {
        final Set referencingManageables = new LinkedHashSet();
        final Collection associationEnds = this.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

Examples of java.util.LinkedHashSet

        return displayAttribute;
    }

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

        final Collection dependencies = this.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)
            {
                this.collectActors(
                    (ActorFacade)dependencyObject,
                    users);
            }
View Full Code Here

Examples of java.util.LinkedHashSet

    /**
     * @see org.andromda.metafacades.uml.Role#isReferencesPresent()
     */
    protected boolean handleIsReferencesPresent()
    {
        final Collection allSourceDependencies = new LinkedHashSet(this.getSourceDependencies());
        for (GeneralizableElementFacade parent = this.getGeneralization(); parent != null;
            parent = parent.getGeneralization())
        {
            allSourceDependencies.addAll(parent.getSourceDependencies());
        }
        boolean present =
            CollectionUtils.find(
                allSourceDependencies,
                new Predicate()
View Full Code Here

Examples of java.util.LinkedHashSet

     *
     * @see org.andromda.metafacades.uml.ClassifierFacade#getOperations()
     */
    protected java.util.Collection handleGetImplementationOperations()
    {
        final Collection operations = new LinkedHashSet();

        // add all of this classifier's operations
        operations.addAll(new FilteredCollection(metaObject.getFeature())
            {
                public boolean evaluate(Object object)
                {
                    return object instanceof Operation;
                }
            });

        if (!this.isInterface())
        {
            final Collection interfaces = this.getInterfaceAbstractions();
            for (Iterator interfaceIterator = interfaces.iterator(); interfaceIterator.hasNext();)
            {
                final ClassifierFacade interfaceElement = (ClassifierFacade)interfaceIterator.next();
                operations.addAll(resolveInterfaceOperationsRecursively(interfaceElement));
            }
        }

        return operations;
    }
View Full Code Here

Examples of java.util.LinkedHashSet

        return operations;
    }

    private static Collection resolveInterfaceOperationsRecursively(ClassifierFacade interfaceClassifier)
    {
        final Collection operations = new LinkedHashSet(interfaceClassifier.getOperations()); // preserve ordering

        final Collection generalizations = interfaceClassifier.getGeneralizations();
        for (Iterator generalizationIterator = generalizations.iterator(); generalizationIterator.hasNext();)
        {
            final ClassifierFacade parent = (ClassifierFacade)generalizationIterator.next();
            if (parent.isInterface())
            {
                operations.addAll(resolveInterfaceOperationsRecursively(parent));
            }
        }

        return operations;
    }
View Full Code Here

Examples of java.util.LinkedHashSet

    /**
     * @see org.andromda.metafacades.uml.FrontEndController#getDeferringActions()
     */
    protected List handleGetDeferringActions()
    {
        final Collection deferringActions = new LinkedHashSet();

        final Collection operations = this.getOperations();
        for (final Iterator operationIterator = operations.iterator(); operationIterator.hasNext();)
        {
            final FrontEndControllerOperation operation = (FrontEndControllerOperation)operationIterator.next();
            deferringActions.addAll(operation.getDeferringActions());
        }
        return new ArrayList(deferringActions);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.