Package net.paulem.arcana.utils
Class UUIDUtils
java.lang.Object
net.paulem.arcana.utils.UUIDUtils
Utility methods for comparing the unique identifiers of entities and UUIDs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks whether two UUIDs are equal.static booleanChecks whether a UUID matches an entity's unique identifier.static booleanChecks whether an entity's unique identifier matches the given UUID.static booleanareEquals(@Nullable org.bukkit.entity.Entity entity, @Nullable org.bukkit.entity.Entity entity1) Checks whether two entities share the same unique identifier.
-
Constructor Details
-
UUIDUtils
public UUIDUtils()
-
-
Method Details
-
areEquals
public static boolean areEquals(@Nullable @Nullable org.bukkit.entity.Entity entity, @Nullable @Nullable org.bukkit.entity.Entity entity1) Checks whether two entities share the same unique identifier.- Parameters:
entity- the first entity, may benullentity1- the second entity, may benull- Returns:
trueif both entities are non-null and have the same UUID,falseotherwise
-
areEquals
public static boolean areEquals(@Nullable @Nullable org.bukkit.entity.Entity entity, @Nullable @Nullable UUID uuid1) Checks whether an entity's unique identifier matches the given UUID.- Parameters:
entity- the entity, may benulluuid1- the UUID to compare against, may benull- Returns:
trueif both are non-null and the entity's UUID equalsuuid1,falseotherwise
-
areEquals
public static boolean areEquals(@Nullable @Nullable UUID uuid, @Nullable @Nullable org.bukkit.entity.Entity entity1) Checks whether a UUID matches an entity's unique identifier.- Parameters:
uuid- the UUID to compare against, may benullentity1- the entity, may benull- Returns:
trueif both are non-null anduuidequals the entity's UUID,falseotherwise
-
areEquals
Checks whether two UUIDs are equal.- Parameters:
uuid- the first UUID, may benulluuid1- the second UUID, may benull- Returns:
trueif both UUIDs are non-null and equal,falseotherwise
-