Package com.alibaba.daybits

Examples of com.alibaba.daybits.DayBits$Year


import com.aliyun.odps.udf.UDF;

public class DayBitsAnd extends UDF {

    public String evaluate(String a, String b) {
        DayBits daybits_a = DayBitsUtils.parse(a);
        DayBits daybits_b = DayBitsUtils.parse(b);
       
        if (a == null || daybits_b == null) {
            return null;
        }
       
View Full Code Here


        }
        return text;
    }

    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);
       
        if (a == null || daybits_b == null || daybits_c == null) {
            return null;
        }
       
View Full Code Here

        }
        return text;
    }
   
    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);
       
        if (a == null || daybits_b == null || daybits_c == null) {
            return null;
        }
       
View Full Code Here

        private DayBits daybits;

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

        public void iterate(String text) {
            merge(text);
        }

        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 DayBitsFirst(){
    }

    public Long evaluate(String text) {       
        DayBits daybits = DayBitsUtils.parse(text);
        if (daybits == null) {
            return null;
        }
        return daybits.first();
    }
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.first(start, end);
    }
View Full Code Here

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

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

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

        DayBits daybits = DayBitsUtils.parse(text);
        return Long.valueOf(daybits.count());
    }

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

TOP

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

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.