Package com.cronutils.model.field

Examples of com.cronutils.model.field.On


        dow.addDescription(new Function<FieldExpression, String>() {
            @Override
            public String apply(FieldExpression fieldExpression) {
                if (fieldExpression instanceof On) {
                    On on = (On) fieldExpression;
                    switch (on.getSpecialChar()) {
                        case HASH:
                            return String.format("%s %s %s ", nominal.apply(on.getTime()), on.getNth(), bundle.getString("of_every_month"));
                        case L:
                            return String.format("%s %s %s ", bundle.getString("last"), nominal.apply(on.getTime()), bundle.getString("of_every_month"));
                        default:
                            return "";
                    }
                }
                return "";
View Full Code Here


        dow.addDescription(new Function<FieldExpression, String>() {
            @Override
            public String apply(FieldExpression fieldExpression) {
                if (fieldExpression instanceof On) {
                    On on = (On) fieldExpression;
                    switch (on.getSpecialChar()) {
                        case W:
                            return String.format("%s %s %s ", bundle.getString("the_nearest_weekday_to_the"), on.getTime(), bundle.getString("of_the_month"));
                        case L:
                            return bundle.getString("last_day_of_month");
                        default:
                            return "";
                    }
View Full Code Here

    @VisibleForTesting
    static Function<CronField, CronField> returnOnZeroExpression(final CronFieldName name){
        return new Function<CronField, CronField>() {
            @Override
            public CronField apply(CronField field) {
                return new CronField(name, new On(FieldConstraintsBuilder.instance().forField(name).createConstraintsInstance(),"0"));
            }
        };
    }
View Full Code Here

TOP

Related Classes of com.cronutils.model.field.On

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.