All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.espertech.esper.epl.datetime.reformatop.ReformatOpToMillisec Maven / Gradle / Ivy

Go to download

Complex event processing and event series analysis component

There is a newer version: 7.1.0
Show newest version
package com.espertech.esper.epl.datetime.reformatop;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.util.Calendar;
import java.util.Date;

public class ReformatOpToMillisec implements ReformatOp {
    private static final Log log = LogFactory.getLog(ReformatOpToMillisec.class);

    public Object evaluate(Long ts) {
        return ts;
    }

    public Object evaluate(Date d) {
        return d.getTime();
    }

    public Object evaluate(Calendar cal) {
        return cal.getTimeInMillis();
    }

    public Class getReturnType() {
        return Long.class;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy