Class EntityYComparator

java.lang.Object
de.gurkenlabs.litiengine.entities.EntityYComparator
All Implemented Interfaces:
java.util.Comparator<IEntity>

public class EntityYComparator
extends java.lang.Object
implements java.util.Comparator<IEntity>
This Comparator implementation sorts entities by the max y-coordinate of their collision box (if its a ICollisionEntity) or of their bounding box.
See Also:
ICollisionEntity.getCollisionBox(), IEntity.getBoundingBox(), Double.compareTo(Double)
  • Constructor Summary

    Constructors 
    ConstructorDescription
    EntityYComparator() 
  • Method Summary

    Modifier and TypeMethodDescription
    intcompare​(IEntity m1, IEntity m2) 

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Comparator

    equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong