Java utilities and algorithm implementations