Make OldEnum and Particle interface for easier implementation

This commit is contained in:
DerFrZocker 2024-06-05 20:47:58 +02:00
parent 15a7261c13
commit 2abfcc4958
No known key found for this signature in database
GPG key ID: 713F71FFFE1DDF91
13 changed files with 134 additions and 134 deletions

View file

@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
* Represents the art on a painting.
* Listed Arts are present at the default server.
*/
public abstract class Art extends OldEnum<Art> implements Keyed {
public abstract class Art implements OldEnum<Art>, Keyed {
@Deprecated
private static final Map<Integer, Art> BY_ID = Maps.newHashMap();

View file

@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a fluid type.
*/
public abstract class Fluid extends OldEnum<Fluid> implements Keyed {
public abstract class Fluid implements OldEnum<Fluid>, Keyed {
/**
* Empty.

View file

@ -10,14 +10,14 @@ import org.bukkit.util.OldEnum;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
public abstract class Particle extends OldEnum<Particle> implements Keyed {
public interface Particle extends OldEnum<Particle>, Keyed {
/**
* Typed represents a subtype of {@link Particle particles} that have a data type.
*
* @param <D> the generic data type of the particle.
*/
public abstract static class Typed<D> extends Particle {
interface Typed<D> extends Particle {
/**
* Returns the required data type for the particle
@ -26,178 +26,178 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
*/
@NotNull
@Override
public abstract Class<D> getDataType();
Class<D> getDataType();
}
public static final Particle POOF = getParticle("poof");
public static final Particle EXPLOSION = getParticle("explosion");
public static final Particle EXPLOSION_EMITTER = getParticle("explosion_emitter");
public static final Particle FIREWORK = getParticle("firework");
public static final Particle BUBBLE = getParticle("bubble");
public static final Particle SPLASH = getParticle("splash");
public static final Particle FISHING = getParticle("fishing");
public static final Particle UNDERWATER = getParticle("underwater");
public static final Particle CRIT = getParticle("crit");
public static final Particle ENCHANTED_HIT = getParticle("enchanted_hit");
public static final Particle SMOKE = getParticle("smoke");
public static final Particle LARGE_SMOKE = getParticle("large_smoke");
public static final Particle EFFECT = getParticle("effect");
public static final Particle INSTANT_EFFECT = getParticle("instant_effect");
Particle POOF = getParticle("poof");
Particle EXPLOSION = getParticle("explosion");
Particle EXPLOSION_EMITTER = getParticle("explosion_emitter");
Particle FIREWORK = getParticle("firework");
Particle BUBBLE = getParticle("bubble");
Particle SPLASH = getParticle("splash");
Particle FISHING = getParticle("fishing");
Particle UNDERWATER = getParticle("underwater");
Particle CRIT = getParticle("crit");
Particle ENCHANTED_HIT = getParticle("enchanted_hit");
Particle SMOKE = getParticle("smoke");
Particle LARGE_SMOKE = getParticle("large_smoke");
Particle EFFECT = getParticle("effect");
Particle INSTANT_EFFECT = getParticle("instant_effect");
/**
* Uses {@link Color} as DataType
*/
public static final Particle.Typed<Color> ENTITY_EFFECT = getParticle("entity_effect");
public static final Particle AMBIENT_ENTITY_EFFECT = getParticle("ambient_entity_effect");
public static final Particle WITCH = getParticle("witch");
public static final Particle DRIPPING_WATER = getParticle("dripping_water");
public static final Particle DRIPPING_LAVA = getParticle("dripping_lava");
public static final Particle ANGRY_VILLAGER = getParticle("angry_villager");
public static final Particle HAPPY_VILLAGER = getParticle("happy_villager");
public static final Particle MYCELIUM = getParticle("mycelium");
public static final Particle NOTE = getParticle("note");
public static final Particle PORTAL = getParticle("portal");
public static final Particle ENCHANT = getParticle("enchant");
public static final Particle FLAME = getParticle("flame");
public static final Particle LAVA = getParticle("lava");
public static final Particle CLOUD = getParticle("cloud");
Particle.Typed<Color> ENTITY_EFFECT = getParticle("entity_effect");
Particle AMBIENT_ENTITY_EFFECT = getParticle("ambient_entity_effect");
Particle WITCH = getParticle("witch");
Particle DRIPPING_WATER = getParticle("dripping_water");
Particle DRIPPING_LAVA = getParticle("dripping_lava");
Particle ANGRY_VILLAGER = getParticle("angry_villager");
Particle HAPPY_VILLAGER = getParticle("happy_villager");
Particle MYCELIUM = getParticle("mycelium");
Particle NOTE = getParticle("note");
Particle PORTAL = getParticle("portal");
Particle ENCHANT = getParticle("enchant");
Particle FLAME = getParticle("flame");
Particle LAVA = getParticle("lava");
Particle CLOUD = getParticle("cloud");
/**
* Uses {@link Particle.DustOptions} as DataType
*/
public static final Particle.Typed<DustOptions> DUST = getParticle("dust");
public static final Particle ITEM_SNOWBALL = getParticle("item_snowball");
public static final Particle ITEM_SLIME = getParticle("item_slime");
public static final Particle HEART = getParticle("heart");
Particle.Typed<DustOptions> DUST = getParticle("dust");
Particle ITEM_SNOWBALL = getParticle("item_snowball");
Particle ITEM_SLIME = getParticle("item_slime");
Particle HEART = getParticle("heart");
/**
* Uses {@link ItemStack} as DataType
*/
public static final Particle.Typed<ItemStack> ITEM = getParticle("item");
Particle.Typed<ItemStack> ITEM = getParticle("item");
/**
* Uses {@link BlockData} as DataType
*/
public static final Particle.Typed<BlockData> BLOCK = getParticle("block");
public static final Particle RAIN = getParticle("rain");
public static final Particle ELDER_GUARDIAN = getParticle("elder_guardian");
public static final Particle DRAGON_BREATH = getParticle("dragon_breath");
public static final Particle END_ROD = getParticle("end_rod");
public static final Particle DAMAGE_INDICATOR = getParticle("damage_indicator");
public static final Particle SWEEP_ATTACK = getParticle("sweep_attack");
Particle.Typed<BlockData> BLOCK = getParticle("block");
Particle RAIN = getParticle("rain");
Particle ELDER_GUARDIAN = getParticle("elder_guardian");
Particle DRAGON_BREATH = getParticle("dragon_breath");
Particle END_ROD = getParticle("end_rod");
Particle DAMAGE_INDICATOR = getParticle("damage_indicator");
Particle SWEEP_ATTACK = getParticle("sweep_attack");
/**
* Uses {@link BlockData} as DataType
*/
public static final Particle.Typed<BlockData> FALLING_DUST = getParticle("falling_dust");
public static final Particle TOTEM_OF_UNDYING = getParticle("totem_of_undying");
public static final Particle SPIT = getParticle("spit");
public static final Particle SQUID_INK = getParticle("squid_ink");
public static final Particle BUBBLE_POP = getParticle("bubble_pop");
public static final Particle CURRENT_DOWN = getParticle("current_down");
public static final Particle BUBBLE_COLUMN_UP = getParticle("bubble_column_up");
public static final Particle NAUTILUS = getParticle("nautilus");
public static final Particle DOLPHIN = getParticle("dolphin");
public static final Particle SNEEZE = getParticle("sneeze");
public static final Particle CAMPFIRE_COSY_SMOKE = getParticle("campfire_cosy_smoke");
public static final Particle CAMPFIRE_SIGNAL_SMOKE = getParticle("campfire_signal_smoke");
public static final Particle COMPOSTER = getParticle("composter");
public static final Particle FLASH = getParticle("flash");
public static final Particle FALLING_LAVA = getParticle("falling_lava");
public static final Particle LANDING_LAVA = getParticle("landing_lava");
public static final Particle FALLING_WATER = getParticle("falling_water");
public static final Particle DRIPPING_HONEY = getParticle("dripping_honey");
public static final Particle FALLING_HONEY = getParticle("falling_honey");
public static final Particle LANDING_HONEY = getParticle("landing_honey");
public static final Particle FALLING_NECTAR = getParticle("falling_nectar");
public static final Particle SOUL_FIRE_FLAME = getParticle("soul_fire_flame");
public static final Particle ASH = getParticle("ash");
public static final Particle CRIMSON_SPORE = getParticle("crimson_spore");
public static final Particle WARPED_SPORE = getParticle("warped_spore");
public static final Particle SOUL = getParticle("soul");
public static final Particle DRIPPING_OBSIDIAN_TEAR = getParticle("dripping_obsidian_tear");
public static final Particle FALLING_OBSIDIAN_TEAR = getParticle("falling_obsidian_tear");
public static final Particle LANDING_OBSIDIAN_TEAR = getParticle("landing_obsidian_tear");
public static final Particle REVERSE_PORTAL = getParticle("reverse_portal");
public static final Particle WHITE_ASH = getParticle("white_ash");
Particle.Typed<BlockData> FALLING_DUST = getParticle("falling_dust");
Particle TOTEM_OF_UNDYING = getParticle("totem_of_undying");
Particle SPIT = getParticle("spit");
Particle SQUID_INK = getParticle("squid_ink");
Particle BUBBLE_POP = getParticle("bubble_pop");
Particle CURRENT_DOWN = getParticle("current_down");
Particle BUBBLE_COLUMN_UP = getParticle("bubble_column_up");
Particle NAUTILUS = getParticle("nautilus");
Particle DOLPHIN = getParticle("dolphin");
Particle SNEEZE = getParticle("sneeze");
Particle CAMPFIRE_COSY_SMOKE = getParticle("campfire_cosy_smoke");
Particle CAMPFIRE_SIGNAL_SMOKE = getParticle("campfire_signal_smoke");
Particle COMPOSTER = getParticle("composter");
Particle FLASH = getParticle("flash");
Particle FALLING_LAVA = getParticle("falling_lava");
Particle LANDING_LAVA = getParticle("landing_lava");
Particle FALLING_WATER = getParticle("falling_water");
Particle DRIPPING_HONEY = getParticle("dripping_honey");
Particle FALLING_HONEY = getParticle("falling_honey");
Particle LANDING_HONEY = getParticle("landing_honey");
Particle FALLING_NECTAR = getParticle("falling_nectar");
Particle SOUL_FIRE_FLAME = getParticle("soul_fire_flame");
Particle ASH = getParticle("ash");
Particle CRIMSON_SPORE = getParticle("crimson_spore");
Particle WARPED_SPORE = getParticle("warped_spore");
Particle SOUL = getParticle("soul");
Particle DRIPPING_OBSIDIAN_TEAR = getParticle("dripping_obsidian_tear");
Particle FALLING_OBSIDIAN_TEAR = getParticle("falling_obsidian_tear");
Particle LANDING_OBSIDIAN_TEAR = getParticle("landing_obsidian_tear");
Particle REVERSE_PORTAL = getParticle("reverse_portal");
Particle WHITE_ASH = getParticle("white_ash");
/**
* Uses {@link DustTransition} as DataType
*/
public static final Particle.Typed<DustTransition> DUST_COLOR_TRANSITION = getParticle("dust_color_transition");
Particle.Typed<DustTransition> DUST_COLOR_TRANSITION = getParticle("dust_color_transition");
/**
* Uses {@link Vibration} as DataType
*/
public static final Particle.Typed<Vibration> VIBRATION = getParticle("vibration");
public static final Particle FALLING_SPORE_BLOSSOM = getParticle("falling_spore_blossom");
public static final Particle SPORE_BLOSSOM_AIR = getParticle("spore_blossom_air");
public static final Particle SMALL_FLAME = getParticle("small_flame");
public static final Particle SNOWFLAKE = getParticle("snowflake");
public static final Particle DRIPPING_DRIPSTONE_LAVA = getParticle("dripping_dripstone_lava");
public static final Particle FALLING_DRIPSTONE_LAVA = getParticle("falling_dripstone_lava");
public static final Particle DRIPPING_DRIPSTONE_WATER = getParticle("dripping_dripstone_water");
public static final Particle FALLING_DRIPSTONE_WATER = getParticle("falling_dripstone_water");
public static final Particle GLOW_SQUID_INK = getParticle("glow_squid_ink");
public static final Particle GLOW = getParticle("glow");
public static final Particle WAX_ON = getParticle("wax_on");
public static final Particle WAX_OFF = getParticle("wax_off");
public static final Particle ELECTRIC_SPARK = getParticle("electric_spark");
public static final Particle SCRAPE = getParticle("scrape");
public static final Particle SONIC_BOOM = getParticle("sonic_boom");
public static final Particle SCULK_SOUL = getParticle("sculk_soul");
Particle.Typed<Vibration> VIBRATION = getParticle("vibration");
Particle FALLING_SPORE_BLOSSOM = getParticle("falling_spore_blossom");
Particle SPORE_BLOSSOM_AIR = getParticle("spore_blossom_air");
Particle SMALL_FLAME = getParticle("small_flame");
Particle SNOWFLAKE = getParticle("snowflake");
Particle DRIPPING_DRIPSTONE_LAVA = getParticle("dripping_dripstone_lava");
Particle FALLING_DRIPSTONE_LAVA = getParticle("falling_dripstone_lava");
Particle DRIPPING_DRIPSTONE_WATER = getParticle("dripping_dripstone_water");
Particle FALLING_DRIPSTONE_WATER = getParticle("falling_dripstone_water");
Particle GLOW_SQUID_INK = getParticle("glow_squid_ink");
Particle GLOW = getParticle("glow");
Particle WAX_ON = getParticle("wax_on");
Particle WAX_OFF = getParticle("wax_off");
Particle ELECTRIC_SPARK = getParticle("electric_spark");
Particle SCRAPE = getParticle("scrape");
Particle SONIC_BOOM = getParticle("sonic_boom");
Particle SCULK_SOUL = getParticle("sculk_soul");
/**
* Use {@link Float} as DataType
*/
public static final Particle.Typed<Float> SCULK_CHARGE = getParticle("sculk_charge");
public static final Particle SCULK_CHARGE_POP = getParticle("sculk_charge_pop");
Particle.Typed<Float> SCULK_CHARGE = getParticle("sculk_charge");
Particle SCULK_CHARGE_POP = getParticle("sculk_charge_pop");
/**
* Use {@link Integer} as DataType
*/
public static final Particle.Typed<Integer> SHRIEK = getParticle("shriek");
public static final Particle CHERRY_LEAVES = getParticle("cherry_leaves");
public static final Particle EGG_CRACK = getParticle("egg_crack");
public static final Particle DUST_PLUME = getParticle("dust_plume");
public static final Particle WHITE_SMOKE = getParticle("white_smoke");
Particle.Typed<Integer> SHRIEK = getParticle("shriek");
Particle CHERRY_LEAVES = getParticle("cherry_leaves");
Particle EGG_CRACK = getParticle("egg_crack");
Particle DUST_PLUME = getParticle("dust_plume");
Particle WHITE_SMOKE = getParticle("white_smoke");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle GUST = getParticle("gust");
Particle GUST = getParticle("gust");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle SMALL_GUST = getParticle("small_gust");
Particle SMALL_GUST = getParticle("small_gust");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle GUST_EMITTER_LARGE = getParticle("gust_emitter_large");
Particle GUST_EMITTER_LARGE = getParticle("gust_emitter_large");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle GUST_EMITTER_SMALL = getParticle("gust_emitter_small");
Particle GUST_EMITTER_SMALL = getParticle("gust_emitter_small");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle TRIAL_SPAWNER_DETECTION = getParticle("trial_spawner_detection");
Particle TRIAL_SPAWNER_DETECTION = getParticle("trial_spawner_detection");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle TRIAL_SPAWNER_DETECTION_OMINOUS = getParticle("trial_spawner_detection_ominous");
Particle TRIAL_SPAWNER_DETECTION_OMINOUS = getParticle("trial_spawner_detection_ominous");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle VAULT_CONNECTION = getParticle("vault_connection");
Particle VAULT_CONNECTION = getParticle("vault_connection");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle INFESTED = getParticle("infested");
Particle INFESTED = getParticle("infested");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle ITEM_COBWEB = getParticle("item_cobweb");
Particle ITEM_COBWEB = getParticle("item_cobweb");
/**
* Uses {@link BlockData} as DataType
*/
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle.Typed<BlockData> DUST_PILLAR = getParticle("dust_pillar");
Particle.Typed<BlockData> DUST_PILLAR = getParticle("dust_pillar");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle OMINOUS_SPAWNING = getParticle("ominous_spawning");
Particle OMINOUS_SPAWNING = getParticle("ominous_spawning");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle RAID_OMEN = getParticle("raid_omen");
Particle RAID_OMEN = getParticle("raid_omen");
@ApiStatus.Experimental
@MinecraftExperimental(Requires.UPDATE_1_21)
public static final Particle TRIAL_OMEN = getParticle("trial_omen");
Particle TRIAL_OMEN = getParticle("trial_omen");
/**
* Uses {@link BlockData} as DataType
*/
public static final Particle.Typed<BlockData> BLOCK_MARKER = getParticle("block_marker");
Particle.Typed<BlockData> BLOCK_MARKER = getParticle("block_marker");
@NotNull
private static <P extends Particle> P getParticle(@NotNull String key) {
@ -220,7 +220,7 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
* @see #getDataType()
*/
@NotNull
public abstract <D> Particle.Typed<D> typed(@NotNull Class<D> dataType);
<D> Particle.Typed<D> typed(@NotNull Class<D> dataType);
/**
* Returns true if this Particle is typed and requires extra data when spawning it.
@ -229,7 +229,7 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
* @see #getDataType()
* @see #typed(Class)
*/
public abstract boolean isTyped();
boolean isTyped();
/**
* Returns the required data type for the particle
@ -240,7 +240,7 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
* @see #typed(Class)
*/
@NotNull
public abstract Class<?> getDataType();
Class<?> getDataType();
/**
* Options which can be applied to redstone dust particles - a particle
@ -309,7 +309,7 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
*/
@NotNull
@Deprecated
public static Particle valueOf(@NotNull String name) {
static Particle valueOf(@NotNull String name) {
Particle particle = Registry.PARTICLE_TYPE.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(particle != null, "No particle found with the name %s", name);
return particle;
@ -321,7 +321,7 @@ public abstract class Particle extends OldEnum<Particle> implements Keyed {
*/
@NotNull
@Deprecated
public static Particle[] values() {
static Particle[] values() {
return Lists.newArrayList(Registry.PARTICLE_TYPE).toArray(new Particle[0]);
}
}

View file

@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a countable statistic, which is tracked by the server.
*/
public abstract class Statistic extends OldEnum<Statistic> implements Keyed {
public abstract class Statistic implements OldEnum<Statistic>, Keyed {
public static final Statistic DAMAGE_DEALT = getStatistic("damage_dealt");
public static final Statistic DAMAGE_TAKEN = getStatistic("damage_taken");

View file

@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Types of attributes which may be present on an {@link Attributable}.
*/
public abstract class Attribute extends OldEnum<Attribute> implements Keyed, Translatable {
public abstract class Attribute implements OldEnum<Attribute>, Keyed, Translatable {
/**
* Maximum health of an Entity.

View file

@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
* Depending on the server there might be additional biomes present (for example biomes created by data packs),
* which you can get via {@link Registry#BIOME}.
*/
public abstract class Biome extends OldEnum<Biome> implements Keyed {
public abstract class Biome implements OldEnum<Biome>, Keyed {
public static final Biome OCEAN = getBiome("ocean");
public static final Biome PLAINS = getBiome("plains");

View file

@ -15,7 +15,7 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public abstract class PatternType extends OldEnum<PatternType> implements Keyed {
public abstract class PatternType implements OldEnum<PatternType>, Keyed {
public static final PatternType BASE = getPatternType("base");
public static final PatternType SQUARE_BOTTOM_LEFT = getPatternType("square_bottom_left");
public static final PatternType SQUARE_BOTTOM_RIGHT = getPatternType("square_bottom_right");

View file

@ -48,7 +48,7 @@ public interface Cat extends Tameable, Sittable {
/**
* Represents the various different cat types there are.
*/
abstract class Type extends OldEnum<Type> implements Keyed {
abstract class Type implements OldEnum<Type>, Keyed {
public static final Type TABBY = getType("tabby");
public static final Type BLACK = getType("black");
public static final Type RED = getType("red");

View file

@ -30,7 +30,7 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public abstract class EntityType extends OldEnum<EntityType> implements Keyed, Translatable {
public abstract class EntityType implements OldEnum<EntityType>, Keyed, Translatable {
private static final BiMap<Short, EntityType> ID_MAP = HashBiMap.create();
/**

View file

@ -48,7 +48,7 @@ public interface Frog extends Animals {
/**
* Represents the variant of a frog - ie its color.
*/
abstract class Variant extends OldEnum<Variant> implements Keyed {
abstract class Variant implements OldEnum<Variant>, Keyed {
/**
* Temperate (brown-orange) frog.

View file

@ -122,7 +122,7 @@ public interface Villager extends AbstractVillager {
* Represents Villager type, usually corresponding to what biome they spawn
* in.
*/
public abstract class Type extends OldEnum<Type> implements Keyed {
public abstract class Type implements OldEnum<Type>, Keyed {
public static final Type DESERT = getType("desert");
public static final Type JUNGLE = getType("jungle");
@ -168,7 +168,7 @@ public interface Villager extends AbstractVillager {
* Represents the various different Villager professions there may be.
* Villagers have different trading options depending on their profession,
*/
public abstract class Profession extends OldEnum<Profession> implements Keyed {
public abstract class Profession implements OldEnum<Profession>, Keyed {
public static final Profession NONE = getProfession("none");
/**
* Armorer profession. Wears a black apron. Armorers primarily trade for

View file

@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
* This class reflects and matches each potion state that can be obtained from
* the Creative mode inventory
*/
public abstract class PotionType extends OldEnum<PotionType> implements Keyed {
public abstract class PotionType implements OldEnum<PotionType>, Keyed {
public static final PotionType EMPTY = getPotionType("empty");
public static final PotionType WATER = getPotionType("water");
public static final PotionType MUNDANE = getPotionType("mundane");

View file

@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
* @deprecated only for backwards compatibility.
*/
@Deprecated
public abstract class OldEnum<T extends OldEnum<T>> implements Comparable<T> {
public interface OldEnum<T extends OldEnum<T>> extends Comparable<T> {
/**
* @param other to compare to.
* @return negative if this old enum is lower, zero if equal and positive if higher than the given old enum.
@ -16,7 +16,7 @@ public abstract class OldEnum<T extends OldEnum<T>> implements Comparable<T> {
*/
@Deprecated
@Override
public abstract int compareTo(@NotNull T other);
int compareTo(@NotNull T other);
/**
* @return the name of the old enum.
@ -24,12 +24,12 @@ public abstract class OldEnum<T extends OldEnum<T>> implements Comparable<T> {
*/
@NotNull
@Deprecated
public abstract String name();
String name();
/**
* @return the ordinal of the old enum.
* @deprecated only for backwards compatibility, it is not guaranteed that an old enum always has the same ordinal.
*/
@Deprecated
public abstract int ordinal();
int ordinal();
}