mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +00:00
- Recode most classes - Add phases to battles - Pull updates from gradle-template-plugin
28 lines
547 B
Java
28 lines
547 B
Java
package com.github.alathra.alathranwars.conflict;
|
|
|
|
import java.util.UUID;
|
|
|
|
public interface IUnique<T extends IUnique<T>> {
|
|
UUID getUUID();
|
|
|
|
/**
|
|
* Equals boolean.
|
|
*
|
|
* @param uuid the uuid
|
|
* @return the boolean
|
|
*/
|
|
default boolean equals(UUID uuid) {
|
|
return getUUID().equals(uuid);
|
|
}
|
|
|
|
/**
|
|
* Equals boolean.
|
|
*
|
|
* @param obj the object implementing IUnique
|
|
* @return the boolean
|
|
*/
|
|
default boolean equals(T obj) {
|
|
return getUUID().equals(obj.getUUID());
|
|
}
|
|
}
|