jezuch-utils
This is a toolkit of classes and interfaces that were generic enough to put into a separate entity, for everyone to enjoy and (ab)use. But let me warn you, that however I tried to make it somewhat usable, the level of abstraction can be murderous for some (wooses!). The thing is, I took
advice of ESR∞ and learned
LISP∞. Nothing is the same since then. You may notice a declarative and/or functional scent in lots of places in my code. It seems that I hate loops now ;)
There are several packages in the library:
- jezuch.utils: a collection of perverted things like CollectionAdapter∞ or LookupSet∞. Basically just a junkyard of ideas of how to avoid loops and write everything the most declarative and/or functional way.
- jezuch.utils.parameters: an attempt to make java.util.Properties∞ more type-safe. When I think of it, it reminds me of jelly (no, not the brain-damaged attempt to turn XML into programming language). Basically the Parameters∞ class maps keys (of generic type K) to... something. This "something" is given as an argument to calls to setValue∞ and getValue∞ - you can put something as a String and get out as an Integer - and it will convert it on-the-fly for you (if the String does not represent a valid Integer, it will throw an exception). You can install validators for keys that will guard for proper values (they have a side-effect of being type-keepers for values). You can request a live view of the values as a Map∞ to values of any specified type (again, conversion will be done on-the-fly). Just pure sweetness.
- jezuch.utils.io: currently contains only a ReaderSource∞ interface and its two implementations (for files and URLs). It's nothing more than a factory for Reader∞s.
- jezuch.utils.ini: a simple parser for INI files; Starmapper has historically used this format for configuration files. It's simple and popular (thanks to Microsoft, mostly), so why not? It parses the file and exposes it as a Set∞<INISection∞> [SIDENOTE: in Starmapper version 3 this simplicity gets a bit in the way of new unified configuration model employed by the two default applications, but it's a minor annoyance only].
- jezuch.utils.pcx: package name says it all. A PCX image encoder; formerly just a "dump-into-an-output-stream" class, now pluggable into IIO∞.
The Subversion repository contains two branches:
trunk∞ and
experimental∞. The trunk contains utilities actually used by Starmapper, while the experimental branch contains additional classes and packages that I created for other purposes and may be useful. I recommend to check out the
jezuch.utils.observable∞ package - I hope you don't faint at the sight of the sources :)
So, if you're interested, check out the
javadocs for trunk∞ and
experimental∞. There are also javadocs for
20070915 snapshot release∞.
There are no comments on this page. [Add comment]