Library of useful Java functions