T - the type of the stored SatelliteData implementationpublic interface HexagonDataStorage<T extends SatelliteData>
HexagonalGrid.| Modifier and Type | Method and Description |
|---|---|
void |
addCoordinate(CubeCoordinate cubeCoordinate)
Adds a
CubeCoordinate for this grid without any SatelliteData. |
boolean |
addCoordinate(CubeCoordinate cubeCoordinate,
T satelliteData)
Adds a
CubeCoordinate for this grid with SatelliteData. |
boolean |
clearDataFor(CubeCoordinate cubeCoordinate)
Clears the
SatelliteData for the given CubeCoordinate. |
boolean |
containsCoordinate(CubeCoordinate cubeCoordinate)
Tells whether there is a
Hexagon on the given CubeCoordinate or not. |
rx.Observable<CubeCoordinate> |
getCoordinates()
Returns all coordinates which are stored in this object.
|
Optional<T> |
getSatelliteDataBy(CubeCoordinate cubeCoordinate)
Gets the
SatelliteData stored on a CubeCoordinate if present. |
boolean |
hasDataFor(CubeCoordinate cubeCoordinate)
Tells whether there is
SatelliteData stored for a CubeCoordinate or not. |
void addCoordinate(CubeCoordinate cubeCoordinate)
CubeCoordinate for this grid without any SatelliteData.
Does not overwrite the coordinate if it is already present.boolean addCoordinate(CubeCoordinate cubeCoordinate, T satelliteData)
CubeCoordinate for this grid with SatelliteData.
Overwrites previous SatelliteData if it was present.Optional<T> getSatelliteDataBy(CubeCoordinate cubeCoordinate)
SatelliteData stored on a CubeCoordinate if present.
Also returns empty Optional when cubeCoordinate is not present.SatelliteData.boolean containsCoordinate(CubeCoordinate cubeCoordinate)
Hexagon on the given CubeCoordinate or not.boolean hasDataFor(CubeCoordinate cubeCoordinate)
SatelliteData stored for a CubeCoordinate or not.
Also returns false if cubeCoordinate is not present in the storage.rx.Observable<CubeCoordinate> getCoordinates()
boolean clearDataFor(CubeCoordinate cubeCoordinate)
SatelliteData for the given CubeCoordinate.Copyright © 2016. All rights reserved.