/** * @deprecated While this solution is not as abhorrent as I had imagined, I still highly recommend switching to the * new conversion API. */ @Deprecated public static <T> EquivalentConverter<Set<T>> getSetConverter(final Class<?> genericType, final EquivalentConverter<T> itemConverter) { if (itemConverter instanceof EnumWrappers.EnumConverter) { ((EnumWrappers.EnumConverter) itemConverter).setGenericType(genericType); } return getSetConverter(itemConverter); }
/** * Retrieve a read/write structure for the Set class. * @param converter Converter for elements * @param <E> Element param * @return A modifier for Set fields * * @see BukkitConverters * @see EquivalentConverter */ public <E> StructureModifier<Set<E>> getSets(EquivalentConverter<E> converter) { return structureModifier.withType( Set.class, BukkitConverters.getSetConverter(converter)); }