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

net.time4j.engine.TimeLine Maven / Gradle / Ivy

There is a newer version: 4.38
Show newest version
/*
 * -----------------------------------------------------------------------
 * Copyright © 2013-2016 Meno Hochschild, 
 * -----------------------------------------------------------------------
 * This file (TimeLine.java) is part of project Time4J.
 *
 * Time4J is free software: You can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * Time4J is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Time4J. If not, see .
 * -----------------------------------------------------------------------
 */

package net.time4j.engine;


/**
 * 

Represents a time axis where a point in time can be moved forward or * backward.

* *

As step width, the associated time axis will usually use the smallest * registered time unit.

* * @param generic type of time points * @author Meno Hochschild * @since 2.0 */ /*[deutsch] *

Repräsentiert eine Zeitachse, entlang der ein Zeitpunkt schrittweise * vorwärts oder zurück gesetzt werden kann.

* *

Als Schrittweite wird die zugehörige Zeitachse gewöhnlich die * kleinste registrierte Zeiteinheit verwenden.

* * @param generic type of time points * @author Meno Hochschild * @since 2.0 */ public interface TimeLine { //~ Methoden ---------------------------------------------------------- /** *

Move given point in time forward by one step.

* * @param timepoint point in time to be moved forward * @return new point in time one step after given argument * or {@code null} if applied on the maximum of timeline * @since 2.0 */ /*[deutsch] *

Setzt den angegebenen Zeitpunkt einen Schritt vorwärts.

* * @param timepoint point in time to be moved forward * @return new point in time one step after given argument * or {@code null} if applied on the maximum of timeline * @since 2.0 */ T stepForward(T timepoint); /** *

Move given point in time backwards by one step.

* * @param timepoint point in time to be moved backwards * @return new point in time one step before given argument * or {@code null} if applied on the minimum of timeline * @since 2.0 */ /*[deutsch] *

Setzt den angegebenen Zeitpunkt einen Schritt * rückwärts.

* * @param timepoint point in time to be moved backwards * @return new point in time one step before given argument * or {@code null} if applied on the minimum of timeline * @since 2.0 */ T stepBackwards(T timepoint); /** *

Yields the minimum of this time axis.

* *

Implementors of this interface are required to override this method otherwise an * {@code UnsupportedOperationException} will happen at runtime.

* * @return earliest possible time point * @since 4.18 */ /*[deutsch] *

Ermittelt das Minimum auf der Zeitachse.

* * @return earliest possible time point * @since 4.18 */ default T getMinimum() { throw new UnsupportedOperationException("Not implemented."); // TODO: v5.0 => keine default-Methode } /** *

Yields the maximum of this time axis.

* *

Implementors of this interface are required to override this method otherwise an * {@code UnsupportedOperationException} will happen at runtime.

* * @return latest possible time point * @since 4.18 */ /*[deutsch] *

Ermittelt das Maximum auf der Zeitachse.

* * @return latest possible time point * @since 4.18 */ default T getMaximum() { throw new UnsupportedOperationException("Not implemented."); // TODO: v5.0 => keine default-Methode } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy