@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!super.equals(obj)) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        RollingCalendar other = (RollingCalendar) obj;
        if (type != other.type) {
            return false;
        }
        return super.equals(obj);
    }
RollingCalendar is a helper class to DailyRollingFileAppender. Given a
periodicity type and the current time, it computes the start of the next
interval.
metamorphosis-client-extension/src/main/java/com/taobao/metamorphosis/client/extension/log4j/DailyRollingFileStreamAppender.java