A vector class in Java