Interface | Description |
---|---|
FaceObject |
Common interface for FaceObject.
|
FaceObjectProvidersListener |
Interface for listeners interested in
FaceObjectProviders related
events. |
FaceObjects |
FaceObjects is a container for
FaceObjects . |
FaceProvider |
This interface represents a lazy loader that provides images on demand.
|
Class | Description |
---|---|
AbstractFaceObjects |
Abstract base class for
FaceObjects implementations. |
AbstractFaceProvider |
Abstract Base class for FaceProviders which implements a memory sensitive
cache.
|
ArchFaceProvider |
Implementation of FaceProvider which reads images from the arch directory.
|
CollectedFaceProvider |
Implementation of FaceProvider which reads images from the collected PNG
archive.
|
ColourFilter |
Class to filter images by simply applying a boolean OR operation.
|
DefaultFaceObject |
A FaceObject stores information and meta information about a face and
provides methods for accessing these.
|
DefaultFaceObjects |
Abstract base implementation of
FaceObjects . |
DoubleImageFilter |
An
ImageFilter that produces double faces: the source image is drawn
twice with a vertical shift. |
EmptyFaceProvider |
A
FaceProvider that does not return any faces. |
FaceObjectProviders |
Provider for faces of
GameObjects and Archetypes . |
FilterFaceProvider |
A FilterFaceProvider provides modified versions of icons provided by another
FaceProvider by applying a Filter.
|
StretchedImageFilter |
An
ImageFilter that produces stretched faces. |
Exception | Description |
---|---|
DuplicateFaceException |
Exception that's thrown in case a face name was not unique.
|
IllegalFaceException |
Exception thrown to indicate that a face object is not acceptable.
|
This package contains classes for managing icons in memory sensitive caches. Currently, the keys to lookup the icons are Strings (usually the facename of an archetype), and lookup is done in HashMaps.
HashMaps are fast, but, of course, never as fast as an indexed array. Though, HashMaps are easier to maintain. In case someone complains about the usage of HashMaps instead of arrays in this package, I have documented my performance considerations.
Also, an archetype first naturally comes with a face name. To get an index for a face name, it is required to first do a linear search. Linear search is always wrong and averages to O(n * c) which is worse than HashMap performance. If the indices are sorted, a binary search with a performance of O(2*c + log2(n)*c*2), which is exactly what a HashMap does. That means, the term that best describes the usage of artificial face indices for increasing face lookup performance is "Augenauswischerei".
Conclusions