Class BuildingBuilderResource.ResourceComparator
java.lang.Object
com.minecolonies.core.colony.buildings.utils.BuildingBuilderResource.ResourceComparator
- All Implemented Interfaces:
Serializable,Comparator<BuildingBuilderResource>
- Enclosing class:
- BuildingBuilderResource
public static class BuildingBuilderResource.ResourceComparator
extends Object
implements Comparator<BuildingBuilderResource>, Serializable
Comparator class for BuildingBuilderResource.
This is use in the gui to order the list of resources needed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceComparator(BuildingBuilderResource.RessourceAvailability... resourceOrder) -
Method Summary
Modifier and TypeMethodDescriptionintcompare(BuildingBuilderResource resource1, BuildingBuilderResource resource2) Compare to resource together.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
-
ResourceComparator
-
-
Method Details
-
compare
Compare to resource together.We want the item availalable in the player inventory first and the one not needed last In alphabetical order otherwise
- Specified by:
comparein interfaceComparator<BuildingBuilderResource>
-