- All Superinterfaces:
IdHolder
public interface StructuredData<T>
extends IdHolder
-
Method Summary
Returns empty structured data, equivalent to an empty Optional in vanilla.
boolean
Returns whether the structured data is empty.
default boolean
Returns whether the structured data is present.
Returns filled structured data, equivalent to an Optional with a value in vanilla.
void
void
void
write(io.netty.buffer.ByteBuf buffer)
Methods inherited from interface com.viaversion.viaversion.util.IdHolder
id
-
Method Details
-
of
Returns filled structured data, equivalent to an Optional with a value in vanilla.
- Type Parameters:
T
- serializer type
- Parameters:
key
- serializer key
value
- value
id
- serializer id
- Returns:
- filled structured data
-
empty
Returns empty structured data, equivalent to an empty Optional in vanilla.
- Parameters:
key
- serializer key
id
- serializer id
- Returns:
- empty structured data
-
-
-
-
-
isPresent
default boolean isPresent()
Returns whether the structured data is present. Even if true, the value may be null.
- Returns:
- true if the structured data is present
-
isEmpty
boolean isEmpty()
Returns whether the structured data is empty. Not to be confused with a null value.
- Returns:
- true if the structured data is empty
-
write
void write(io.netty.buffer.ByteBuf buffer)