A certain maximum heap implementation in java