Package net.kyori.adventure.text.event
Interface DataComponentValueConverterRegistry.Conversion<I,O>
-
- Type Parameters:
I- input typeO- output type
- All Superinterfaces:
net.kyori.examination.Examinable
- Enclosing class:
- DataComponentValueConverterRegistry
@NonExtendable public static interface DataComponentValueConverterRegistry.Conversion<I,O> extends net.kyori.examination.ExaminableA single conversion that may be provided by a provider.- Since:
- 4.17.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <I1,O1>
@NotNull DataComponentValueConverterRegistry.Conversion<I1,O1>convert(@NotNull java.lang.Class<I1> src, @NotNull java.lang.Class<O1> dst, @NotNull java.util.function.BiFunction<Key,I1,O1> op)Create a new conversion.Oconvert(@NotNull Key key, I input)Perform the actual conversion.@NotNull java.lang.Class<O>destination()The destination type.@NotNull java.lang.Class<I>source()The source type.
-
-
-
Method Detail
-
convert
@NotNull static <I1,O1> @NotNull DataComponentValueConverterRegistry.Conversion<I1,O1> convert(@NotNull @NotNull java.lang.Class<I1> src, @NotNull @NotNull java.lang.Class<O1> dst, @NotNull @NotNull java.util.function.BiFunction<Key,I1,O1> op)
Create a new conversion.- Type Parameters:
I1- the input typeO1- the output type- Parameters:
src- the source typedst- the destination typeop- the conversion operation- Returns:
- a conversion object
- Since:
- 4.17.0
-
source
@Contract(pure=true) @NotNull @NotNull java.lang.Class<I> source()
The source type.- Returns:
- the source type
- Since:
- 4.17.0
-
destination
@Contract(pure=true) @NotNull @NotNull java.lang.Class<O> destination()
The destination type.- Returns:
- the destination type
- Since:
- 4.17.0
-
-