All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getunleash.util.AtomicLongSerializer Maven / Gradle / Ivy

The newest version!
package io.getunleash.util;

import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import java.util.concurrent.atomic.AtomicLong;

public class AtomicLongSerializer implements JsonSerializer {

    @Override
    public JsonElement serialize(AtomicLong src, Type typeOfSrc, JsonSerializationContext context) {
        return new JsonPrimitive(src.get());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy