Package com.alibaba.daybits

Examples of com.alibaba.daybits.DayBits$Quarter


    public Long evaluate(String text, Long start) {
        return evaluate(text, start, null);
    }

    public Long evaluate(String text, String start, String end) {
        DayBits daybits = DayBitsUtils.parse(text);
        if (daybits == null) {
            return 0L;
        }
        return Long.valueOf(daybits.count(start, end));
    }
View Full Code Here


    public String evaluate(String text, String date) {
        return evaluate(text, date, true);
    }

    public String evaluate(String text, String date, Boolean value) {
        DayBits daybits;
        if (text == null || text.isEmpty()) {
            if (date == null || value == null || !value) {
                return null;
            }
            daybits = new DayBits();
        } else {
            daybits = DayBitsUtils.parse(text);
        }
       
        boolean changed = daybits.set(date, value);
        if (!changed) {
            return text;
        }

        return daybits.toString();
    }
View Full Code Here

    public String evaluate(String text, Long date) {
        return evaluate(text, date, true);
    }
   
    public String evaluate(String text, Long date, Boolean value) {
        DayBits daybits;
        if (text == null || text.isEmpty()) {
            if (date == null || value == null || !value) {
                return null;
            }
            daybits = new DayBits();
        } else {
            daybits = DayBitsUtils.parse(text);
        }
       
        boolean changed = daybits.set(date.intValue(), value);
        if (!changed) {
            return text;
        }

        return daybits.toString();
    }
View Full Code Here

    public Boolean evaluate(String text, String date) {
        if (text == null || text.isEmpty() || date == null || date.isEmpty()) {
            return null;
        }

        DayBits daybits = DayBitsUtils.parse(text);
        return daybits.get(date);
    }
View Full Code Here

    public Boolean evaluate(String text, Long date) {
        if (text == null || text.isEmpty() || date == null) {
            return null;
        }
       
        DayBits daybits = DayBitsUtils.parse(text);
        return daybits.get(date.intValue());
    }
View Full Code Here

    public DayBitsExplain(){
    }

    public String evaluate(String text) {
        DayBits daybits = DayBitsUtils.parse(text);
        if (daybits == null) {
            return null;
        }
        return daybits.explain();
    }
View Full Code Here

    public String evaluate(String text, String startDate) {
        return evaluate(text, startDate, null);
    }

    public String evaluate(String text, String startDate, String endDate) {
        DayBits daybits = DayBitsUtils.parse(text);

        if (daybits == null) {
            return null;
        }

        return daybits.explain(startDate, endDate);
    }
View Full Code Here

    public String evaluate(String text, Long startDate) {
        return evaluate(text, startDate, null);
    }

    public String evaluate(String text, Long startDate, Long endDate) {
        DayBits daybits = DayBitsUtils.parse(text);

        if (daybits == null) {
            return null;
        }

        return daybits.explain(startDate, endDate);
    }
View Full Code Here

TOP

Related Classes of com.alibaba.daybits.DayBits$Quarter

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.