Package groovyx.gpars.extra166y

Examples of groovyx.gpars.extra166y.Ops$Predicate


       
        vv.getRenderContext().setVertexShapeTransformer(new ClusterVertexShapeFunction());
       
        final PredicatedParallelEdgeIndexFunction eif = PredicatedParallelEdgeIndexFunction.getInstance();
        final Set exclusions = new HashSet();
        eif.setPredicate(new Predicate() {

      public boolean evaluate(Object e) {
       
        return exclusions.contains(e);
      }});
View Full Code Here


       
        vv.getRenderContext().setVertexShapeTransformer(new ClusterVertexShapeFunction());
       
        final PredicatedParallelEdgeIndexFunction eif = PredicatedParallelEdgeIndexFunction.getInstance();
        final Set exclusions = new HashSet();
        eif.setPredicate(new Predicate() {

      public boolean evaluate(Object e) {
       
        return exclusions.contains(e);
      }});
View Full Code Here

            if (i % 6 == 0) {
                sixes.add(new Integer(i));
            }
        }

        truePred = new Predicate() {
            public boolean evaluate(Object x) {
                return true;
            }
        };

        falsePred = new Predicate() {
            public boolean evaluate(Object x) {
                return true;
            }
        };

        evenPred = new Predicate() {
            public boolean evaluate(Object x) {
                return (((Integer) x).intValue() % 2 == 0);
            }
        };

        oddPred = new Predicate() {
            public boolean evaluate(Object x) {
                return (((Integer) x).intValue() % 2 == 1);
            }
        };

        threePred = new Predicate() {
            public boolean evaluate(Object x) {
                return (((Integer) x).intValue() % 3 == 0);
            }
        };

        fourPred = new Predicate() {
            public boolean evaluate(Object x) {
                return (((Integer) x).intValue() % 4 == 0);
            }
        };
View Full Code Here

            // success
        }
    }

    private void verifyElementsInPredicate(final String[] elements) {
        Predicate pred = new Predicate() {
            public boolean evaluate(Object x) {
                for (int i = 0; i < elements.length; i++)
                    if (elements[i].equals(x))
                        return true;
                return false;
View Full Code Here

     *
     * @param i the Iterator to "filter"
     * @return "filtered" iterator
     */
    protected FilterIterator makePassThroughFilter(Iterator i) {
        Predicate pred = new Predicate() {
            public boolean evaluate(Object x) {
                return true;
            }
        };
        return new FilterIterator(i, pred);
View Full Code Here

     *
     * @param i the Iterator to "filter"
     * @return "filtered" iterator
     */
    protected FilterIterator makeBlockAllFilter(Iterator i) {
        Predicate pred = new Predicate() {
            public boolean evaluate(Object x) {
                return false;
            }
        };
        return new FilterIterator(i, pred);
View Full Code Here

    }
   
    //--------------------------------------------------------------------------

    protected Predicate stringPredicate() {
        return new Predicate() {
            public boolean evaluate(Object o) {
                return o instanceof String;
            }
        };
    }
View Full Code Here

    }
   
    //--------------------------------------------------------------------------
   
    protected Predicate stringPredicate() {
        return new Predicate() {
            public boolean evaluate(Object o) {
                return o instanceof String;
            }
        };
    }
View Full Code Here

TOP

Related Classes of groovyx.gpars.extra166y.Ops$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.