gov.nasa.worldwind.render
Class SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
java.lang.Object
gov.nasa.worldwind.render.SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
- All Implemented Interfaces:
- Cacheable
- Enclosing class:
- SurfaceObjectTileBuilder
protected static class SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
- extends Object
- implements Cacheable
Represents a surface object tile's current state. TileStateKey distinguishes the tile's state by comparing the
individual state keys of the surface objects intersecting the tile. This does not retain any references to the
surface objects themselves. Should the tile state key live longer than the surface objects, the state key does
not prevent those objects from being reclaimed by the garbage collector.
intersectingObjectKeys
protected final Object[] intersectingObjectKeys
tileKey
protected final TileKey tileKey
SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
public SurfaceObjectTileBuilder.SurfaceObjectTileStateKey(DrawContext dc,
SurfaceObjectTileBuilder.SurfaceObjectTile tile)
- Construsts a tile state key for the specified surface object tile.
- Parameters:
dc - the draw context the state key is related to.tile - the tile to construct a state key for.
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
getSizeInBytes
public long getSizeInBytes()
- Returns the tile state key's size in bytes. The total size of the intersecting object keys, plus the size of
the array itself. The tileKey is owned by the SurfaceObjectTile, so we don't include it in the state key's
size.
- Specified by:
getSizeInBytes in interface Cacheable
- Returns:
- The state key's size in bytes.
hashCode
public int hashCode()
- Overrides:
hashCode in class Object