An simple function written in non-idiomatic, Java-like Ruby.