Package net.minestom.server.network
Interface NetworkBuffer.Type<T>
- Enclosing interface:
NetworkBuffer
public static interface NetworkBuffer.Type<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull NetworkBuffer.Type
<List<T>> list()
default @NotNull NetworkBuffer.Type
<List<T>> list
(int maxSize) default <V> @NotNull NetworkBuffer.Type
<Map<T, V>> mapValue
(@NotNull NetworkBuffer.Type<V> valueType) default <V> @NotNull NetworkBuffer.Type
<Map<T, V>> mapValue
(@NotNull NetworkBuffer.Type<V> valueType, int maxSize) default @NotNull NetworkBuffer.Type
<T> optional()
read
(@NotNull NetworkBuffer buffer) default long
default long
sizeOf
(T value, @Nullable Registries registries) default <S> @NotNull NetworkBuffer.Type
<S> default <R> @NotNull NetworkBuffer.Type
<R> void
write
(@NotNull NetworkBuffer buffer, T value)
-
Method Details
-
write
-
read
-
sizeOf
-
sizeOf
-
transform
@NotNull default <S> @NotNull NetworkBuffer.Type<S> transform(@NotNull @NotNull Function<T, S> to, @NotNull @NotNull Function<S, T> from) -
mapValue
@NotNull default <V> @NotNull NetworkBuffer.Type<Map<T,V>> mapValue(@NotNull @NotNull NetworkBuffer.Type<V> valueType, int maxSize) -
mapValue
@NotNull default <V> @NotNull NetworkBuffer.Type<Map<T,V>> mapValue(@NotNull @NotNull NetworkBuffer.Type<V> valueType) -
list
-
list
-
optional
-
unionType
@NotNull default <R> @NotNull NetworkBuffer.Type<R> unionType(@NotNull @NotNull Function<T, NetworkBuffer.Type<R>> serializers, @NotNull @NotNull Function<R, T> keyFunc)
-