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

be.looorent.ponto.client.CollectionResponse Maven / Gradle / Ivy

The newest version!
package be.looorent.ponto.client;

import be.looorent.ponto.synchronization.Synchronization;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Optional;

/**
 * More than a simple collection of entities, this also stores
 * the response page.
 * @param  the type of entities
 */
public interface CollectionResponse {
    Page getPage();
    Collection getEntities();

    Optional getSynchronizedAt();
    Optional getLatestSynchronization();

    default boolean hasBefore() {
        return getPage().hasBefore();
    }

    default boolean hasAfter() {
        return getPage().hasAfter();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy