Package com.alibaba.daybits

Examples of com.alibaba.daybits.DayBits$Quarter


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

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


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

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

        }
        return daybits.last(start, end);
    }

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

    public String evaluate(String a, String b) {
        return DayBitsUtils.or(a, b);
    }

    public String evaluate(String a, String b, String c) {
        DayBits daybits_a = DayBitsUtils.parse(a);
        DayBits daybits_b = DayBitsUtils.parse(b);
        DayBits daybits_c = DayBitsUtils.parse(c);
       
        DayBits daybits_ab = DayBitsUtils.or(daybits_a, daybits_b);
        DayBits daybits_abc = DayBitsUtils.or(daybits_ab, daybits_c);
        return DayBitsUtils.toString(daybits_abc);
    }
View Full Code Here

        DayBits daybits_abc = DayBitsUtils.or(daybits_ab, daybits_c);
        return DayBitsUtils.toString(daybits_abc);
    }
   
    public String evaluate(String a, String b, String c, String d) {
        DayBits daybits_a = DayBitsUtils.parse(a);
        DayBits daybits_b = DayBitsUtils.parse(b);
        DayBits daybits_c = DayBitsUtils.parse(c);
        DayBits daybits_d = DayBitsUtils.parse(d);
       
        DayBits daybits_ab = DayBitsUtils.or(daybits_a, daybits_b);
        DayBits daybits_cd = DayBitsUtils.or(daybits_c, daybits_d);
        DayBits daybits_abcd = DayBitsUtils.or(daybits_ab, daybits_cd);
        return DayBitsUtils.toString(daybits_abcd);
    }
View Full Code Here

        private DayBits daybits;

        @Override
        public void init() {
            daybits = new DayBits();
        }
View Full Code Here

            daybits = new DayBits();
        }

        public void iterate(String date) {
            if (daybits == null) {
                daybits = new DayBits();
            }

            daybits.set(date, true);
        }
View Full Code Here

            daybits.set(date, true);
        }

        public void merge(String pr) {
            DayBits prDaybits = DayBitsUtils.parse(pr);
            if (this.daybits != null) {
                this.daybits.merge(prDaybits);
            } else {
                this.daybits = prDaybits;
            }
View Full Code Here

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

    public Boolean evaluate(String text, String start, String end) {
        DayBits daybits = DayBitsUtils.parse(text);
        if (daybits == null) {
            return false;
        }
        return daybits.exists(start, end);
    }
View Full Code Here

        }
        return daybits.exists(start, end);
    }

    public Boolean evaluate(String text, Long start, Long end) {
        DayBits daybits = DayBitsUtils.parse(text);
        if (daybits == null) {
            return false;
        }
        return daybits.exists(start, end);
    }
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.