Package org.apache.commons.collections

Examples of org.apache.commons.collections.Predicate


     */
    private EntityAssociationEnd getForeignIdentifierEnd()
    {
        return (EntityAssociationEnd)CollectionUtils.find(
            this.getAssociationEnds(),
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    boolean valid = false;
                    if (object != null && EntityAssociationEnd.class.isAssignableFrom(object.getClass()))
View Full Code Here


     */
    protected ParameterFacade handleFindParameter(final String name)
    {
        return (ParameterFacade)CollectionUtils.find(
            this.getParameters(),
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    final ParameterFacade parameter = (ParameterFacade)object;
                    return StringUtils.trimToEmpty(parameter.getName()).equals(name);
View Full Code Here

    /**
     * @see org.andromda.metafacades.uml.StateMachineFacade#getFinalStates()
     */
    protected java.util.Collection handleGetFinalStates()
    {
        final Predicate filter =
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return object instanceof FinalState;
                }
View Full Code Here

    /**
     * @see org.andromda.metafacades.uml.StateMachineFacade#getStates()
     */
    protected java.util.Collection handleGetStates()
    {
        final Predicate filter =
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return object instanceof State;
                }
View Full Code Here

    /**
     * @see org.andromda.metafacades.uml.StateMachineFacade#getInitialStates()
     */
    protected java.util.Collection handleGetInitialStates()
    {
        final Predicate filter =
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return (object instanceof Pseudostate) &&
                    (PseudostateKindEnum.PK_INITIAL.equals(((Pseudostate)object).getKind()));
View Full Code Here

    /**
     * @see org.andromda.metafacades.uml.StateMachineFacade#getPseudostates()
     */
    protected java.util.Collection handleGetPseudostates()
    {
        final Predicate filter =
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return (object instanceof Pseudostate);
                }
View Full Code Here

    protected java.util.Collection handleGetLiterals()
    {
        Collection literals = this.getAttributes();
        CollectionUtils.filter(
            literals,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean isLiteral = true;
                    final AttributeFacade attribute = (AttributeFacade)object;
View Full Code Here

    protected java.util.Collection handleGetMemberVariables()
    {
        Collection variables = super.getAttributes();
        CollectionUtils.filter(
            variables,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean isMember = false;
                    final AttributeFacade attribute = (AttributeFacade)object;
View Full Code Here

            roles.addAll(((Service)this.getOwner()).getRoles());
        }
        final Collection operationRoles = new ArrayList(this.getTargetDependencies());
        CollectionUtils.filter(
            operationRoles,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    DependencyFacade dependency = (DependencyFacade)object;
                    return dependency != null && dependency.getSourceElement() != null &&
View Full Code Here

    public Object handleGetIncomingDestination()
    {
        final Collection dependencies = this.getTargetDependencies();
        final DependencyFacade dependency = (DependencyFacade)
            CollectionUtils.find(dependencies,
                new Predicate() {
   
                    public boolean evaluate(Object object)
                    {
                        return ((DependencyFacade)object).getSourceElement() instanceof Destination;
                    }});
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.