commons-java

The commons-java contains java utilities and mini-frameworks that are created to support other developments. It contains the following packages:

  • org.onemind.commons.java.criterion - for representing logical constraints
  • org.onemind.commons.java.datastructure - some datastructure classes
  • org.onemind.commons.java.event - event/event firer interface and a simple listener list implementation
  • org.onemind.commons.java.html.css - css attribute constants for css related programming, and a simple css generation framework
  • org.onemind.commons.java.io - FileUtils
  • org.onemind.commons.java.lang - Null, Enum, ConfigurationException and ReflectUtils
  • org.onemind.commons.java.servlet - ServletUtils
  • org.onemind.commons.java.sql - sql metadata representation, sql type mapper and utils
  • org.onemind.commons.java.util - more utilities classes
  • org.onemind.commons.java.xml - utilities for xml parsing

Some useful stuff

org.onemind.commons.java.datastructure
CounterQueue Represents a list of counters with a queue per counter object. You can queue and dequeue to a counter identified by a counter object
InheritableValueMap Allow mapping value to a class and the value is inheritable by class hierarchy.
LookupCache An abstract implementation of simple lookup caching algorithm for looking up things. The subclass simply implement the produce(Object key) method which is assumed an expensive operation and the results will be cached by the cache
MruList Most recently used list implementation. It support entries expiration by access time.
MruMap a most recently used map that expires entries by access time (based on MruList)
TrackedMap A map wrapper that can track, apply and revert changes to a given map
org.onemind.commons.java.lang.reflect
ReflectUtils allows quicker class lookup and method invocation than normal java reflection (2.5 faster than class lookup with Class.forName, >8 time faster to lookup a method)
org.onemind.commons.java.pattern
DynamicVisitor A visitor pattern implementation that doesn't require the visitable node to implement any interface (based on InheritableValueMap)
org.onemind.commons.java.sql
contains MetaData, Field for metadata representation and JdbcUtils that creates them through jdbc connection
org.onemind.commons.java.util
Counter For counting occurrance of objects
org.onemind.commons.java.xml.digest
Mini framework for xml digestion. It is lighter than apache digester framework but yet as powerful. See here for more details on the framework.