Original create by MrFoo sunflow user

Adapted for java class