Package org.apache.commons.collections

Examples of org.apache.commons.collections.Predicate


    public Object handleGetOutgoingDestination()
    {
        final Collection dependencies = this.getSourceDependencies();
        final DependencyFacade dependency = (DependencyFacade)
        CollectionUtils.find(dependencies,
            new Predicate() {

                public boolean evaluate(Object object)
                {
                    return ((DependencyFacade)object).getTargetElement() instanceof Destination;
                }});
View Full Code Here


    protected Collection handleGetRoles()
    {
        final Collection roles = new ArrayList(this.getTargetDependencies());
        CollectionUtils.filter(
            roles,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    DependencyFacade dependency = (DependencyFacade)object;
                    return dependency != null && dependency.getSourceElement() instanceof Role;
View Full Code Here

     * @see org.andromda.metafacades.uml.Service#getRoles()
     */
    protected Collection handleGetRoles()
    {
        final Collection roles = new ArrayList(this.getTargetDependencies());
        CollectionUtils.filter(roles, new Predicate()
        {
            public boolean evaluate(final Object object)
            {
                DependencyFacade dependency = (DependencyFacade)object;
                return dependency != null && dependency.getSourceElement() instanceof Role;
View Full Code Here

            allSourceDependencies.addAll(parent.getSourceDependencies());
        }
        boolean present =
            CollectionUtils.find(
                allSourceDependencies,
                new Predicate()
                {
                    public boolean evaluate(Object object)
                    {
                        DependencyFacade dependency = (DependencyFacade)object;
                        Object target = dependency.getTargetElement();
View Full Code Here

     */
    protected org.andromda.metafacades.uml.AttributeFacade handleFindAttribute(final java.lang.String name)
    {
        return (AttributeFacade)CollectionUtils.find(
            this.getAttributes(true),
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    final AttributeFacade attribute = (AttributeFacade)object;
                    return StringUtils.trimToEmpty(attribute.getName()).equals(name);
View Full Code Here

    protected java.util.Collection handleGetStaticAttributes()
    {
        Collection attributes = this.getAttributes();
        CollectionUtils.filter(
            attributes,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    return ((AttributeFacade)object).isStatic();
                }
View Full Code Here

    protected java.util.Collection handleGetInstanceAttributes()
    {
        Collection attributes = this.getAttributes();
        CollectionUtils.filter(
            attributes,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    return !((AttributeFacade)object).isStatic();
                }
View Full Code Here

    protected java.util.Collection handleGetStaticOperations()
    {
        Collection operations = this.getOperations();
        CollectionUtils.filter(
            operations,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    return ((OperationFacade)object).isStatic();
                }
View Full Code Here

    protected java.util.Collection handleGetInstanceOperations()
    {
        Collection operations = this.getOperations();
        CollectionUtils.filter(
            operations,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    return !((OperationFacade)object).isStatic();
                }
View Full Code Here

    protected java.util.Collection handleGetAbstractions()
    {
        final Collection dependencies = new ArrayList(this.metaObject.getClientDependencies());
        CollectionUtils.filter(
            dependencies,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    return object instanceof Abstraction;
                }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.Predicate

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.