Class SpeedAbilityComparator
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.SpeedAbilityComparator
- All Implemented Interfaces:
Comparator<PixelmonWrapper>
Compares Pokémon by battle speed and how long they have had their ability.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(PixelmonWrapper pw1, PixelmonWrapper pw2) protected booleanCalculates whether one Pokémon moves before another.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SpeedAbilityComparator
public SpeedAbilityComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<PixelmonWrapper>
-
doesGoFirst
Calculates whether one Pokémon moves before another.- Parameters:
p- The Pokémon to check for moving first.foe- The Pokémon opposing p.- Returns:
- Whether p moves first.
-