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

it.unibo.alchemist.model.interfaces.Time Maven / Gradle / Ivy

There is a newer version: 20.0.1
Show newest version
/*
 * Copyright (C) 2010-2014, Danilo Pianini and contributors
 * listed in the project's pom.xml file.
 * 
 * This file is part of Alchemist, and is distributed under the terms of
 * the GNU General Public License, with a linking exception, as described
 * in the file LICENSE in the Alchemist distribution's top directory.
 */
package it.unibo.alchemist.model.interfaces;

import java.io.Serializable;

/**
 * 
 * Interface for time representation.
 */
public interface Time extends Comparable

* will be both true. */ Time clone(); /** * Verifies if the {@link Time} is set at infinite, namely if the event will * never happen. * * @return true if the {@link Time} is infinite */ boolean isInfinite(); /** * Allows to multiply this {@link Time} for a constant. * * @param var * the {@link Time} to sum to the current {@link Time} * * @return the result of the multiplication * */ Time multiply(double var); /** * Allows to subtract a {@link Time} to this {@link Time}. * * @param dt * the time to subtract from the current {@link Time} * * @return the result of the subtraction */ Time subtract(Time dt); /** * Allows to add a {@link Time} to this {@link Time}. * * @param dt * the time to sum to the current {@link Time} * * @return the result of the sum */ Time sum(Time dt); /** * Allows to get a double representation of this {@link Time}. * * @return the double representation of this {@link Time} */ double toDouble(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy