The Key builder can also be a CatalogBuilder.
import org.spongepowered.api.data.value.ValueContainer;
import org.spongepowered.api.event.EventListener;
import org.spongepowered.api.event.data.ChangeDataHolderEvent;
-import org.spongepowered.api.util.ResettableBuilder;
+import org.spongepowered.api.util.CatalogBuilder;
import org.spongepowered.api.util.TypeTokens;
import java.lang.reflect.Type;
*/
<E extends DataHolder> void registerEvent(Class<E> holderFilter, EventListener<ChangeDataHolderEvent.ValueChange> listener);
- interface Builder<E, V extends BaseValue<E>> extends ResettableBuilder<Key<V>, Builder<E, V>> {
+ interface Builder<E, V extends BaseValue<E>> extends CatalogBuilder<Key<V>, Builder<E, V>> {
/**
* Starter method for the builder, to be used immediately after
*/
<T, B extends BaseValue<T>> Builder<T, B> type(TypeToken<B> token);
- /**
- * Sets the string id to be used for {@link CatalogType#getId()}.
- *
- * <p>This should be formatted appropriately, review {@link CatalogType}
- * documentation for formatted ids.</p>
- *
- * @param id The string id
- * @return This builder, for chaining
- */
+ @Override
Builder<E, V> id(String id);
- /**
- * Sets the human readable name for the generated {@link Key}.
- *
- * @param name The human readable name
- * @return This builder, for chaining
- */
+ @Override
Builder<E, V> name(String name);
/**
*
* @return The generated Key
*/
+ @Override
Key<V> build();
@Override
