Class NetKeyMapper<T>

Direct Known Subclasses:
NetKeyMapper.OfEnum, NetKeyMapper.ToString

public abstract class NetKeyMapper<T>
extends java.lang.Object
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  NetKeyMapper.OfEnum<E extends java.lang.Enum<E>>  
    static class  NetKeyMapper.ToString<T>  
  • Field Summary

    Modifier and Type Field Description
    java.lang.Class<T> clazz  
    int length
    The known length in bytes of this key, or LENGTH_DYNAMIC if this isn't a constant.
    static int LENGTH_DYNAMIC  
  • Constructor Summary

    Constructor Description
    NetKeyMapper​(java.lang.Class<T> clazz)  
    NetKeyMapper​(java.lang.Class<T> clazz, int length)  
  • Method Summary

    Modifier and Type Method Description
    abstract T read​(NetByteBuf buffer, IMsgReadCtx ctx)
    Reads the value for the key from the buffer, optionally using the parent keys.
    abstract void write​(NetByteBuf buffer, IMsgWriteCtx ctx, T value)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait