minor docs

This commit is contained in:
gnembon committed 2021-05-21 04:40:32 -03:00
1 parent cc7a9c01be
commit 22abf2fab6
4 files changed
+6 -8

No files matched your search

@@ -67,7 +67,7 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList;
* @see OutputConverter#registerToValue(Class, java.util.function.Function)
* @see OutputConverter#register(Class, java.util.function.Function)
* @see ValueCaster#register(Class, String)
* @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function)
* @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String)
* @see Param.Params#registerStrictConverter(Class, boolean, ValueConverter)
* @see Param.Params#registerCustomConverterFactory(java.util.function.BiFunction)
*/
@@ -170,8 +170,7 @@ public interface Param
};*/
/**
* <p>A {@link ValueConverter} that outputs the {@link Context} in which the function has been called when running
* {@link #checkAndConvert(Iterator, Context, Context.Type)}, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* <p>A {@link ValueConverter} that outputs the {@link Context} in which the function has been called, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* directly.</p>
*/
static final ValueConverter<Context> CONTEXT_PROVIDER = new ValueConverter<Context>()
@@ -198,8 +197,7 @@ public interface Param
};
/**
* <p>A {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called when running
* {@link #checkAndConvert(Iterator, Context, Context.Type)}, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* <p>A {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* directly.</p>
*/
static final ValueConverter<Context.Type> CONTEXT_TYPE_PROVIDER = new ValueConverter<Context.Type>()
@@ -21,7 +21,7 @@ import carpet.script.value.Value;
* of provided arguments is either too large or too small.</p>
*
* <p>Types to be used in those functions must be already registered in their respective {@link ValueConverter} implementations.<br>
* In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function)},
* In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String)},
* and in order to register a new variant of {@link Value}, use {@link ValueCaster#register(Class, String)}.<br>
* In order to convert the output of your method to a {@link LazyValue} you will also need to register its conversion in {@link OutputConverter}</p>
*
@@ -22,7 +22,7 @@ import net.minecraft.world.World;
*
* <p>{@link SimpleTypeConverter}s are reused whenever asked for one, since they don't have any complexity.</p>
*
* @see #registerType(Class, Class, Function)
* @see #registerType(Class, Class, Function, String)
*
* @param <T> The type of the required input {@link Value}
* @param <R> The type that this converter converts to
@@ -53,7 +53,7 @@ public final class SimpleTypeConverter<T extends Value, R> implements ValueConve
* <p>The default constructor for {@link SimpleTypeConverter}.</p>
*
* <p>This is public in order to provide an implementation to use when registering {@link ValueConverter}s for the {@link Param.Strict} annotation
* registry, and it's not intended way to register new {@link SimpleTypeConverter}</p> <p>Use {@link #registerType(Class, Class, Function)} for
* registry, and it's not intended way to register new {@link SimpleTypeConverter}</p> <p>Use {@link #registerType(Class, Class, Function, String)} for
* that.</p>
*
* @param inputType The required type for the input {@link Value}