Class NamedBitsetAdapter<T>

java.lang.Object
com.google.gson.TypeAdapter<T>
net.bramp.ffmpeg.gson.NamedBitsetAdapter<T>

public class NamedBitsetAdapter<T> extends com.google.gson.TypeAdapter<T>
Converts a json object which represents a set of booleans. For example:
 
 public class Set {
   public boolean a = true;
   public boolean b = false;
   public int c = 1;
   public int d = 0;
 }
 
 
is turned into:
 {
   "a": true,
   "b": false,
   "c": true,
   "d": false
 }
 
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    read(com.google.gson.stream.JsonReader reader)
     
    protected com.google.common.base.Optional<Boolean>
    readBoolean(com.google.gson.stream.JsonReader reader)
     
    protected void
    setField(T target, String name, boolean value)
     
    void
    write(com.google.gson.stream.JsonWriter writer, T value)
     

    Methods inherited from class com.google.gson.TypeAdapter Link icon

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

    Methods inherited from class java.lang.Object Link icon

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