com.belladati.sdk.util.CachedList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-api Show documentation
Show all versions of sdk-api Show documentation
The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the SDK's interface definitions.
package com.belladati.sdk.util;
import java.util.List;
/**
* A list that is cached by the client, a special case of a
* {@link CachedCollection}. Call {@link #load()} to initially load its contents
* from the server or to clear the cache and reload at a later time.
*
* @author Chris Hennigfeld
*/
public interface CachedList extends CachedCollection> {
/**
* Clears and loads the content of this list from the server.
*
* @return this list (for chaining)
*/
@Override
CachedList load();
/**
* Loads the content of this list from the server if it hasn't been loaded
* before. Calling this method is equivalent to:
*
* if(!list.isLoaded() { list.load(); }
*
* @return this list (for chaining)
*/
@Override
CachedList loadFirstTime();
/**
* Synonymous to {@link #get()}, returns this CachedList's contents as an
* immutable List.
*
* @return this CachedList's contents as an immutable List
*/
List toList();
}