Package fr.upem.query

Examples of fr.upem.query.Donor


        switch (with.field) {
            case "name":
                result.stream()
                        .filter(d -> {
                            Donor donor = (Donor) d;
                            if (with.operator == Operator.GREATER_THAN) {
                                return (0 > donor.getName().compareTo(with.constant));
                            } else if (with.operator == Operator.LESS_THAN) {
                                return (0 < donor.getName().compareTo(with.constant));
                            } else {
                                return (0 == donor.getName().compareTo(with.constant));
                            }
                        });
                break;
            case "amount":
                result.stream()
                        .filter(d -> {
                            Donor donor = (Donor) d;
                            if (with.operator == Operator.GREATER_THAN) {
                                return (Integer.getInteger(with.constant) > donor.getAmount());
                            } else if (with.operator == Operator.LESS_THAN) {
                                return (Integer.getInteger(with.constant) < donor.getAmount());
                            } else {
                                return (Integer.getInteger(with.constant) == donor.getAmount());
                            }
                        });
            default:
                throw new UnsupportedOperationException();
        }
View Full Code Here

TOP

Related Classes of fr.upem.query.Donor

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.