Interface DiscreteResourceCodec<T>


  • @Beta
    public interface DiscreteResourceCodec<T>
    Represents the common interface to encode an object of the specified type to an integer, and to decode an integer to an object of the specified type. This class is intended to be used only by the ResourceService implementation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T decode​(int value)
      Decodes the specified integer to an object.
      int encode​(T resource)
      Encodes the specified object to an integer.
    • Method Detail

      • encode

        int encode​(T resource)
        Encodes the specified object to an integer.
        Parameters:
        resource - resource
        Returns:
        encoded integer
      • decode

        T decode​(int value)
        Decodes the specified integer to an object.
        Parameters:
        value - encoded integer
        Returns:
        decoded discrete resource