March 13th, 2008 — Tech
I was wondering what would be the fastest method to iterate over the characters in a string with Java. A small test implements the following things:
- using an Iterable
toCharArray()
charAt()
- calling
charAt() on a CharSequence
You can download the Eclipse project as a tar or zip or browse the code online here; have a look at the StringIteratorTest class first.
Continue reading →
December 2nd, 2007 — Tech
As a follow up to my tests with the Introspector from the Java API, I did some more testing with the following Java Bean to Java Bean mappers:
Furthermore I used my own implementation and an implementation that’s hardcoded by hand.
The Eclipse project with the sample code for this post can be downloaded as tar.gz or zip or can be viewed online here.
Continue reading →
June 27th, 2007 — Tech
Java has the Introspector class that either uses the Reflection API or explicit information about a bean stored in a BeanInfo object. This class provides a standard way to access the properties of JavaBeans and comes in handy if you’d like to copy properties from one bean to another in a generic way.
Continue reading →
June 14th, 2007 — Tech
I really like Groovy: the syntax is similar to Java and will be standardized. This looks promising and like a good investment into the future so I thought about integrating it into a project I’m working on. But first I wanted to compare code written in Java to the equivalent in Groovy and check the performance.
Continue reading →