Removed duration parameter in animator method.
Added a java implementation for comparison.