Examples of Donor


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
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.