adaptive java implementations