public class Areas extends Object
Implementation details| Modifier and Type | Method and Description |
|---|---|
static CacheManager |
cacheManager()
The cache manager that is responsible for all Areas.
|
static void |
clean()
Removes the areas that are not valid anymore.
|
static void |
clear()
Removes the loaded areas.
|
static Collection<Area> |
collection()
Gets the list of areas.
|
static Optional<Area> |
get(String areaID)
Gets the Area that has the given String as an ID.
|
static void |
init()
|
static void |
load()
Loads the list of areas.
|
static Stream<Area> |
stream()
Gets a sequential stream over the areas.
|
public static void init()
throws Request.CantConnectException
Request.CantConnectException - if the server cannot connect to the API.public static void load()
throws Request.CantConnectException
This method is executed in the current thread.
Request.CantConnectException - if the API cannot connect to the serverpublic static Optional<Area> get(String areaID)
This method is written to use IDs. This API is crafted so you never need IDs, so you probably don't need this method.
areaID - the ID of the requested area.public static Collection<Area> collection()
The returned collection is read-only, and cannot be modified in any way.
Idem as a Stream, less object instantiationpublic static Stream<Area> stream()
Idem as a Collectionpublic static void clear()
public static CacheManager cacheManager()
public static void clean()
Modify the Cache Manager.