Package alexiil.mc.lib.net
Class ParentNetIdExtractor<Parent,T>
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
alexiil.mc.lib.net.ParentNetIdBase
alexiil.mc.lib.net.ParentNetIdSingle<T>
alexiil.mc.lib.net.ParentNetIdDuel<Parent,T>
alexiil.mc.lib.net.ParentNetIdExtractor<Parent,T>
public final class ParentNetIdExtractor<Parent,T> extends ParentNetIdDuel<Parent,T>
-
Field Summary
Fields inherited from class alexiil.mc.lib.net.TreeNetIdBase
DYNAMIC_LENGTH, fullName, length, name, totalLength
-
Constructor Summary
Constructors Constructor Description ParentNetIdExtractor(ParentNetIdSingle<Parent> parent, java.lang.String name, java.lang.Class<T> clazz, java.util.function.Function<T,Parent> forward, java.util.function.Function<Parent,T> backward)
-
Method Summary
Modifier and Type Method Description protected Parent
extractParent(T value)
protected T
readContext(NetByteBuf buffer, IMsgReadCtx ctx, Parent parentValue)
protected void
writeContext0(NetByteBuf buffer, IMsgWriteCtx ctx, T value)
Methods inherited from class alexiil.mc.lib.net.ParentNetIdDuel
getPrintableName, readContext, writeContext, writeDynamicContext
Methods inherited from class alexiil.mc.lib.net.ParentNetIdSingle
child, extractor, idData, idData, idSignal, readKey, subType, writeKey
Methods inherited from class alexiil.mc.lib.net.TreeNetIdBase
equals, getRealClassName, hasFixedLength, hashCode, toString
-
Constructor Details
-
Method Details
-
extractParent
- Specified by:
extractParent
in classParentNetIdDuel<Parent,T>
-
writeContext0
- Specified by:
writeContext0
in classParentNetIdDuel<Parent,T>
-
readContext
protected T readContext(NetByteBuf buffer, IMsgReadCtx ctx, Parent parentValue) throws InvalidInputDataException- Specified by:
readContext
in classParentNetIdDuel<Parent,T>
- Returns:
- The read value.
- Throws:
InvalidInputDataException
- if the byte buffer contained invalid data.
-