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
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(PixelmonWrapper pw1, PixelmonWrapper pw2) protected boolean
Calculates whether one Pokémon moves before another.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
-
SpeedAbilityComparator
public SpeedAbilityComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in 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.
-