Source code

The list below contains standalone classes that contain useful or novel features that have proven useful in the past. All classes are packaged as part of the KoBeans library.

CSVTokenizer

CSVTokenizer class, used to parse CSV-format lines. CSV files can be read line by line, and each line can then be processed using this utility class. What makes this class useful is that it can interpret the format of Strings in CSV files, which are enclosed by quotes and that can contain quotes "escaped" as double quotes. Otherwise, it is not much different from a regular StringTokenizer.

Source Code

Padder Class

Padder class, that can be used to pad numbers and Strings with a specified character. It is very simple and easy to use, and principally deals with the fact that the construction of padded values is a cumbersome thing to do without a utility class. It declares a padding workspace to eliminate the use of String Buffers and memory allocation, and is therefore best declared in a fixed place to be reused.

Source Code

PatternMatcher

Pattern matcher, used for simple pattern matching. It is simpler and considerably faster than regular expressions, but has less functionality. A pattern can contain multiple pattern expressions; a pattern expression can contain literal characters, single character wildcards and zero-to-many character wildcards.

Source Code

PerformanceMeter

PerformanceMeter class, a light-weight class used to calculate the processing time as well as processing rate of a block of code. It is best used in unit tests to produce performance benchmarks and/or to verify performance.

Source Code