java.lang.Object
com.google.gson.TypeAdapter<RGBA>
com.hammy275.immersivemc.common.util.RGBA

public class RGBA extends com.google.gson.TypeAdapter<RGBA>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    int
     
    int
     
    int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RGBA(long argb)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    float
     
    int
    getColor(char c)
     
    float
     
    read(com.google.gson.stream.JsonReader in)
     
    float
     
    void
    setColor(char c, int val)
     
    long
     
     
    void
    write(com.google.gson.stream.JsonWriter out, RGBA value)
     

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • r

      public int r
    • g

      public int g
    • b

      public int b
    • a

      public int a
  • Constructor Details

    • RGBA

      public RGBA(long argb)
  • Method Details

    • toLong

      public long toLong()
    • redF

      public float redF()
    • greenF

      public float greenF()
    • blueF

      public float blueF()
    • alphaF

      public float alphaF()
    • getColor

      public int getColor(char c)
    • setColor

      public void setColor(char c, int val)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • write

      public void write(com.google.gson.stream.JsonWriter out, RGBA value) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<RGBA>
      Throws:
      IOException
    • read

      public RGBA read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<RGBA>
      Throws:
      IOException