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

io.qameta.allure.entity.WithGroupTime Maven / Gradle / Ivy

There is a newer version: 2.32.0
Show newest version
package io.qameta.allure.entity;

/**
 * @author charlie (Dmitry Baev).
 */
public interface WithGroupTime {

    GroupTime getTime();

    void setTime(GroupTime time);

    default void updateTime(GroupTime groupTime) {
        getTimeSafe().merge(groupTime);
    }

    default void updateTime(Timeable timed) {
        getTimeSafe().update(timed.getTime());
    }

    default GroupTime getTimeSafe() {
        if (getTime() == null) {
            setTime(new GroupTime());
        }
        return getTime();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy