Class EntityDistanceComparator

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

public class EntityDistanceComparator
extends RelativeEntityComparator
  • Constructor Summary

    Constructors 
    ConstructorDescription
    EntityDistanceComparator​(IEntity relativeEntity)
    Initializes a new instance of the EntityDistanceComparator class.
  • Method Summary

    Modifier and TypeMethodDescription
    intcompare​(IEntity entity1, IEntity entity2) 

    Methods inherited from class de.gurkenlabs.litiengine.entities.RelativeEntityComparator

    getRelativeEntity, setRelativeEntity

    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
  • Constructor Details

    • EntityDistanceComparator

      public EntityDistanceComparator​(IEntity relativeEntity)
      Initializes a new instance of the EntityDistanceComparator class.
      Parameters:
      relativeEntity - The entity that is used as reference for distance comparison.
  • Method Details