A flexible data structure for Java